Reputation: 850
I'm trying to create a regex that will matches with
"8-9."
but won't matches with
"8-9........"
I tried lots of possibilities yet, but still can't find the right one.
Upvotes: 0
Views: 109
Reputation: 4666
try
Dim r As Regex = New Regex("8\-9")
'Look for match
Dim m As Match = r.Match(mystring)
also might use
Dim r As Regex = New Regex("^8\-9$")
if you want a single word
Upvotes: 1