fork(1) download
  1. Imports System
  2. Imports System.Text.RegularExpressions
  3.  
  4. Public Class Test
  5. Public Shared Sub Main()
  6. Dim text As String = "This is a very long string. Invoice Total: $1,399.52 Continuation of very long string."
  7. Dim re As Regex = New Regex("Invoice Total:\s*\$(\d+(?:,\d+)*(?:\.\d+)?)")
  8. Dim m As Match = re.Match(text)
  9. If m.Success Then
  10. Console.WriteLine(m.Groups(1).Value.Replace(",",""))
  11. End If
  12. End Sub
  13. End Class
Success #stdin #stdout 0.06s 27536KB
stdin
Standard input is empty
stdout
1399.52