Sanjeev

Sanjeev

  • NA
  • 28
  • 0

Regex pattern UNMATCH in VB.NET or C#

Mar 7 2011 8:46 PM

need a pattern to match a string which should NOT be --

777777777 
888888888 
999999999 

or start with 00 or 02 or 04. Also the string should be 9 characters long.

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. to negate the condition -- i tried all types of [^] - but didnt work.


Answers (2)