Imports System
Imports System.Text.RegularExpressions

Public Class Test
	Public Shared Sub Main()
		Dim text As String = "This is a very long string. Invoice Total: $1,399.52 Continuation of very long string."
    	Dim re As Regex = New Regex("Invoice Total:\s*\$(\d+(?:,\d+)*(?:\.\d+)?)")
		Dim m As Match = re.Match(text)
        If m.Success Then
            Console.WriteLine(m.Groups(1).Value.Replace(",",""))
        End If
	End Sub
End Class