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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -