fork download
  1. Imports System
  2. Imports System.Text.RegularExpressions
  3. Public Class Test
  4. Public Shared Sub Main()
  5. Dim R As Regex = New Regex(" \( " & _
  6. " (?> " & _
  7. " [^()]+ " & _
  8. " | " & _
  9. " \( (?<DEPTH>) " & _
  10. " | " & _
  11. " \) (?<-DEPTH>) " & _
  12. " )* " & _
  13. " (?(DEPTH)(?!)) " & _
  14. " \) ", _
  15. RegexOptions.IgnorePatternWhitespace)
  16. Dim str As String = R.Replace("1.0 (Mac OS X Mail 9.0 \(3083\))", "")
  17. Console.WriteLine(str)
  18. End Sub
  19. End Class
Success #stdin #stdout 0.08s 24552KB
stdin
Standard input is empty
stdout
1.0