fork(1) download
  1. Imports System
  2. Imports System.Text.RegularExpressions
  3.  
  4.  
  5. Public Class Test
  6. Public Shared Sub Main()
  7. Dim input as String ="ASD~QW~DFGH~LOP~GGGH~123~SXC~QL~"
  8. Dim pattern as String =".*?~([^~]+?)~"
  9. Dim re as Regex = New Regex(pattern)
  10.  
  11. Dim mtch as match = re.Match(input)
  12. For Each grp as Group in mtch.Groups
  13. Console.Write("[{0}], {1}", grp.Value, grp.Captures.Count)
  14. Next
  15. Console.Writeline()
  16.  
  17.  
  18. End Sub
  19. End Class
Success #stdin #stdout 0.09s 18864KB
stdin
Standard input is empty
stdout
[ASD~QW~], 1[QW], 1