Please I am trying to validate a Chinese phone number, which has the condition of having to start with 1 followed by 10 other number for eg.
14375847232
Thanks in advance.
Please I am trying to validate a Chinese phone number, which has the condition of having to start with 1 followed by 10 other number for eg.
14375847232
Thanks in advance.
Try the following regex:
/^1[0-9]{10}$/
Explanation:
^
Beginning of a string1
Matches 1 character[0-9]
Matches 0-9 characters{10}
Matches 10 of the preceding token (0-9)$
End of a string