-3

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.

mbappai
  • 467
  • 1
  • 3
  • 17

1 Answers1

1

Try the following regex:

/^1[0-9]{10}$/

Explanation:

  • ^ Beginning of a string
  • 1 Matches 1 character
  • [0-9] Matches 0-9 characters
  • {10} Matches 10 of the preceding token (0-9)
  • $ End of a string
Daan
  • 2,584
  • 19
  • 37