I am using the following UDF to replace specific letter in names with another letter
Code: Select all
Function MyReplace(ByVal txt As String) As String
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "ي(\s|$)"
MyReplace = Trim(.Replace(txt, "ى "))
End With
End Function
Example: the letters "a" and "c" and "k" would be replaced with "y"
the letters "h" would be replaced with "z"
This is just example to illustrate that I need more replace in flexible way
Thanks advanced for help.