Mega Code Archive

 
Categories / VB.Net Tutorial / Regular Expressions
 

Unicode Category or Unicode Block

'The regular expression construct \p{name} Imports System.Text.RegularExpressions Module Example    Public Sub Main()       Dim pattern As String = "\b(\p{IsGreek}+(\s)?)+\p{Pd}\s(\p{IsBasicLatin}+(\s)?)+"       Dim input As String = "Í - The Gospel of Matthew"       Console.WriteLine(Regex.IsMatch(input, pattern))         ' Displays True.    End Sub End Module