I need to remove some emoji characters from a string using classic asp and vb script. Here is what I have:
Repeat / Other
Scheduled
Lead
And what I need:
Repeat / Other
Scheduled
Lead
I have been able to remove the emojis using this function but I want to keep special characters such as the forward slash /, spaces, &, :, etc.
Any help is appreciated.
Function strClean (strtoclean)
Dim objRegExp, outputStr
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "((?![a-zA-Z0-9]).)+"
outputStr = objRegExp.Replace(strtoclean, "-")
objRegExp.Pattern = "\-+"
outputStr = objRegExp.Replace(outputStr, "")
strClean = outputStr
End Function