/m{4}/ does not solve it, which it should.
@koder3 thanks for the issue, but that regex shouldn't match. The last test it fails says your regex shouldn't match "Timber" with 30 m's in it. And /m{4}/ would match that, which it shouldn't. Additionally, the challenge requirement is to match the word "Timber" with a specific number of m's, not just the m's themselves. Closing as a non-issue. Happy coding!
This is the solution:
let timStr = "Timmmmber";
let timRegex = /Tim{4}ber/g;
let result = timRegex.test(timStr);
/Tim{4}ber/g doesn't actually work. And complains about the third test not being valid (testing the "Timmmmber" word)
I understand that the g flag is not strictly necessary. However, the test is misleading.
Another test not allowing TimmmmberTimmmmber would be okay to verify that the user is not providing the g flag
Most helpful comment
@koder3 thanks for the issue, but that regex shouldn't match. The last test it fails says your regex shouldn't match "Timber" with 30 m's in it. And
/m{4}/would match that, which it shouldn't. Additionally, the challenge requirement is to match the word "Timber" with a specific number of m's, not just the m's themselves. Closing as a non-issue. Happy coding!