Question
March 17, 2011 at 01:44 PM
sanjeev.sircar

Help – need a REGEX pattern to match

by sanjeev.sircar . Updated 15 years, 5 months ago

need help with validating a 9-digit number.
CANNOT BE ———–
000000000
111111111
222222222
333333333
444444444
555555555
666666666
777777777
888888888
999999999

4-5 position(s) CANNOT BE 00 —
123001234

6-9 position(s) CANNOT BE 00 —
234550000

The nine numbers CANNOT BE sequential — but only the following 4 four below, for the time being —
012345678
123456789
987654321
098765432

I had just managed to get the first piece done —
“^(?:(?!0+|1+|2+|3+|4+))\d{9}$”

Thanks a TON for the help friends.

This discussion is locked

All Comments