'--populate array with a bunch of possible prefixes Dim lsArrayPrefix As String() = New String() {"mr", "mrs", "miss", "dr", "prof"} '--loop through the array looking for matches using regexp For intCounter = 0 To UBound(lsArrayPrefix) pattern = "^" & lsArrayPrefix(intCounter) & "\.?\s+" Regex.Replace(strName, pattern, "") Next
^(mr|mrs|miss|dr|prof)[\.\s]*
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)