Permalink
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (17 sloc) 470 Bytes
' Visual Basic .NET Document
Option Strict On
' <Snippet9>
Imports System.Text.RegularExpressions
Module Example
Public Sub Main()
Dim input As String = "2010 1999 1861 2140 2009"
Dim pattern As String = "(?<=\b20)\d{2}\b"
For Each match As Match In Regex.Matches(input, pattern)
Console.WriteLine(match.Value)
Next
End Sub
End Module
' The example displays the following output:
' 10
' 09
' </Snippet9>