fork download
  1. Imports System
  2. Imports System.Text.RegularExpressions
  3.  
  4. Public Class Test
  5. Public Shared Sub Main()
  6. Dim pattern As String = "\b\p{L}+\b"
  7. Dim s As String = "abcd NonLastMatch РОДИНА"
  8. Dim matches As MatchCollection = System.Text.RegularExpressions.Regex.Matches(s, pattern)
  9. For Each m As Match In matches
  10. Console.WriteLine(m.Value)
  11. Next
  12.  
  13. End Sub
  14. End Class
Success #stdin #stdout 0.06s 25680KB
stdin
1
2
10
42
11
stdout
abcd
NonLastMatch
РОДИНА