I have a UDF that enables me to extract the Arabic letters from a string but I need to use regex
Here's my try
Code: Select all
Function ExtractArabic(ByVal inputString As String) As String
Dim regex As Object
Set regex = CreateObject("VBScript.RegExp")
regex.Pattern = "[^ \u0600-\u06FF]+"
If regex.Test(inputString) Then
ExtractArabic = Trim(regex.Replace(inputString, ""))
Else
ExtractArabic = ""
End If
End Function