G
Guest
Anyone knows how to create a regex expression that matches all strings not
containing a specific word?
I thought the following would work but i dows not.
Dim TestRegex As Regex = New Regex("(?!exp).*")
Dim S As String = "exp"
Dim M As Match = TestRegex.Match(S)
If M.Success Then
Debug.Write("Match")
Else
Debug.Write("No Match")
End If
containing a specific word?
I thought the following would work but i dows not.
Dim TestRegex As Regex = New Regex("(?!exp).*")
Dim S As String = "exp"
Dim M As Match = TestRegex.Match(S)
If M.Success Then
Debug.Write("Match")
Else
Debug.Write("No Match")
End If