javascript regex to indicate unwanted digit at the start of string -


i have javascript regex pattern string ten digits.

reg =/^\d{10,10}$/; 

but not sure how modify match string not start number 1

thanks

you want this:

^[02-9]\d{9}$ 

and can visualize on debuggex.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -