javascript - Match exacltly n numeric digits Regex -
i use regex match string of 2 characters, , both of characters have between 0 , 9.
example: if provide 12 - true , if provide 123- should give false.
i have tried below examples.
\d{6}$
^[0-9]{2}$
however, enter 123, giving true need false need two.
Comments
Post a Comment