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.
Loading
VulpesPosted Mar 17, 2011, 6:33 PM
Here's a translation of the above C# code to VB:
VulpesPosted Mar 17, 2011, 5:51 PM
What I'd suggest instead is that you use a mixture of Regex and ordinary string parsing, like this:
FroglegPosted Mar 17, 2011, 5:07 PM
http://www.c-sharpcorner.com/Forums/Thread/111501/regex-pattern-unmatch-in-VB-Net-or-C-Sharp.aspx