How to get the second digits from a string in VB.NET

1 Answer

0 votes
Imports System.Text.RegularExpressions

Module Module1

    Sub Main()

        Dim s As String = "VB.NET 13 Java 89 Python 99 C"
        Dim match As Match = Regex.Match(s, "\d")

        If match.Success Then
            Console.WriteLine(match.Value)
        End If
        match = match.NextMatch()

        If match.Success Then
            Console.WriteLine(match.Value)
        End If

    End Sub

End Module


' run:
' 
' 1
' 3

 



answered Oct 6, 2018 by avibootz
...