Regex.Matches : Regex « System.Text.RegularExpressions « VB.Net by API






Regex.Matches

  
 

Imports System.Text.RegularExpressions

Public Class Tester
    Public Shared Sub Main
        Dim source As String = "This 7. several 0.9 numbers"
        Dim parser As New Regex( _
           "[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?")
        Dim sourceMatches As MatchCollection = parser.Matches(source)
        Dim result As Double = CDbl(sourceMatches(1).Value)
        Console.WriteLine(result.ToString())
    End Sub


End Class

   
    
  








Related examples in the same category

1.Regex.IsMatch