DEV Community

Discussion on: Regex 101

Collapse
 
shreyazz profile image
Shreyas Pahune

It is coming true cuz, it is only testing abhis because of the {1,5} clause, and that substring exists in your name abhishek.

Collapse
 
abhishe01794149 profile image
Abhishek Chandel

then this should give false - /([a-zA-Z]{1,5})/g.test('1abhishek'), but it is giving true again

Thread Thread
 
shreyazz profile image
Shreyas Pahune

Lemme try this on my end