Strugling with regex "exact amount of char" matching

I’ve a couple strings, which should output different values on matching

5555555555 ----> true
27576227382 ----> false

But i’m struggling of how to get it done, since all of the above codes will return true:

/\d{10}/
/\d{10}?/
/\d{10, }/
/\d{0,10}/

Honestly I don’t really know what to test now, since I’ve already tested a lot of stuff in different regex testers, but I dont get it.

10 consecutive numbers , if there are less than 10 consecutive numbers, or more than 10 consecutive numbers, it should return false .

If the entire string can only be 10 digits exactly, then the following will do it:

/^\d{10}$/
1 Like

thanks, now that u mention it I finally remember how it worked, that was it!