Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function RemoveInvalidCharacters(data As String) As String
- 'remove a character set from a string
- Dim objRegex As Object
- Set objRegex = CreateObject("vbscript.regexp")
- With objRegex
- .Global = True
- 'characters to be replaced
- .Pattern = "[\<\>\*\'\,\$\#\@\.\""\?\!\/\[\]\:\|\\\/\?|]"
- RemoveInvalidCharacters = .Replace(data, "")
- End With
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement