Regex string: specific requirement -
i trying regex string right don't seem working should.
i have numeric field should have 5 digits. digits can start 04xxx
, 5xxxx
this string not covering completly:
/[05][0-9][0-9][0-9][0-9]/
it forces start 0 or 5 followed 4 digits, allows example 012345
any ideas?
try regex pattern:
^(04|5\d)\d{3}$
Comments
Post a Comment