Is there a regex that allow if number start with 1 the length will be 10 and if number start other than 1 length is 9.
Examples:
012345678
(since it starts with 0 the length required is 9)1234567890
(since it starts with 1 the length required is 10)
I try ^[1][0-9]{8,9}
but it only do for the b
condition.
I need a regex that will do both conditions.