Permalink
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 529 Bytes
' Visual Basic .NET Document
Option Strict On
' <Snippet3>
Imports System.Text.RegularExpressions
Module Example
Public Sub Main()
Dim pattern As String = "\b(?!non)\w+\b"
Dim input As String = "Nonsense is not always non-functional."
For Each match As Match In Regex.Matches(input, pattern, RegexOptions.IgnoreCase)
Console.WriteLine(match.Value)
Next
End Sub
End Module
' The example displays the following output:
' is
' not
' always
' functional
' </Snippet3>