Click here to Skip to main content
15,922,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
need a pattern to match a string which should NOT be --
777777777
888888888
999999999
or start with 00 or 02 or 04.
when i tried to go create a pattern to match the above requirements, i got it done by -
Dim _pattern6 As String = "^(7+|8+|9+|(00|07|08|09|17|18|19|28|29|43|48|69|70|78|79|80|96|97).*)$"
could not get the NOT MATCH part done.<b></b>
Posted

1 solution

Why don't you just negate the condition of matching.
I mean

When (Not matched) Then // ... your code

Alternatively, you can go here[^] too.


HTH
Rajeev
 
Share this answer
 
Comments
ssircar1971 7-Mar-11 20:41pm    
thanks Rajeev - negating the condition of matching, is breaking one of the policies, thus had requested for the same.
i had tried [^] also - it doesnt work with the pattern i had submitted above.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900