Is there a way to remove all special characters except a-zA-Z0-9 like in Python with:
((re.sub(r"[^a-zA-Z0-9]+", ' ', String)))
As we can use regex, below is the VBA function which can be used.
Public Function AllClean(TextToReplace As String) As String
Dim ObjRegex As Object
Set ObjRegex = CreateObject("vbscript.regexp")
With ObjRegex
.Global = True
.Pattern = "[^a-zA-Z0-9_.\s]+"
AllClean = .Replace(Replace(TextToReplace, "-", Chr(32)), vbNullString)
End With
End Function