I want a Regex for the Saudi national ID
The length is always 10 numbers
It always starts with "1" or "2"
I want a Regex for the Saudi national ID
The length is always 10 numbers
It always starts with "1" or "2"
\b[12]\d{9}\b
[12] - 1 or 2
\d{9} - \d(number) times
It is useful to use sites like this one when you try to come up with a regex: https://regex101.com/