Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| ' Visual Basic .NET Document | |
| Option Strict On | |
| ' <Snippet10> | |
| Imports System.Text.RegularExpressions | |
| Module Example | |
| Public Sub Main() | |
| Dim input As String = "This this word Sentence name Capital" | |
| Dim pattern As String = "\b\p{Lu}\w*\b" | |
| For Each match As Match In Regex.Matches(input, pattern) | |
| Console.WriteLine(match.Value) | |
| Next | |
| Console.WriteLine() | |
| pattern = "\b\p{Lu}(?>\w*)\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: | |
| ' This | |
| ' Sentence | |
| ' Capital | |
| ' | |
| ' This | |
| ' Sentence | |
| ' Capital | |
| ' </Snippet10> | |