You can specify the lower and upper number of patterns with <code>quantity specifiers</code> using curly brackets. Sometimes you only want a specific number of matches.
To specify a certain number of patterns, just have that one number between the curly brackets.
For example, to match only the word <code>"hah"</code> with the letter <code>a</code><code>3</code> times, your regex would be <code>/ha{3}h/</code>.
testString: 'assert(timRegex.source.match(/{.*?}/).length > 0, ''Your regex should use curly brackets.'');'
- text: Your regex should not match <code>"Timber"</code>
testString: 'assert(!timRegex.test("Timber"), ''Your regex should not match <code>"Timber"</code>'');'
- text: Your regex should not match <code>"Timmber"</code>
testString: 'assert(!timRegex.test("Timmber"), ''Your regex should not match <code>"Timmber"</code>'');'
- text: Your regex should not match <code>"Timmmber"</code>
testString: 'assert(!timRegex.test("Timmmber"), ''Your regex should not match <code>"Timmmber"</code>'');'
- text: Your regex should match <code>"Timmmmber"</code>
testString: 'assert(timRegex.test("Timmmmber"), ''Your regex should match <code>"Timmmmber"</code>'');'
- text: Your regex should not match <code>"Timber"</code> with 30 <code>m</code>'s in it.
testString: 'assert(!timRegex.test("Ti" + "m".repeat(30) + "ber"), ''Your regex should not match <code>"Timber"</code> with 30 <code>m</code>\''s in it.'');'