Sanjeev

Sanjeev

  • NA
  • 28
  • 0

need a REGEX pattern to match

Mar 17 2011 4:38 PM
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.

Answers (3)