更新时间:2022-11-18 22:04:36
您可以尝试:
You may try:
Function WordCount(text As String)
Dim pattern As String = "\b(\w+)\b"
Dim r As Regex = New Regex(pattern)
Return r.Matches(text).Count
End Function
http:// lmgtfy的.com / q = vb.net + count + number + of + words + in + string [ ^ ]