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.
如果没有措辞更好的问题, ^8-9$
应该这样做。
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.