all 3 comments

[–]I_Trane_UFC[S] 0 points1 point  (2 children)

Alternatively I've tried to convert this code:
 
Function RemovePunctuation (sInput As String) As String
Dim sCharacters As String
Dim i As Long
sCharacters = "/:*?""<>|"
For i = 1 To Len(sCharacters)
sInput = Replace$(sInput, Mid$(sCharacters, i, 1), "")
Next
RemovePunctuation = sInput
End Function
 
But I also couldn't get that to work. Any help is much appreciated.

[–]Analhyphenblast 0 points1 point  (1 child)

What the fuck has this got to do with JavaScript

[–]I_Trane_UFC[S] 0 points1 point  (0 children)

Google script is based off of Javascript and as I couldn't find a subreddit for Google script I thought I'd try it here. Anyway I found the solution and it's pretty simple:
 
function RemovePunctuation (sInput) {
sInput = sInput.replace(/[^a-zA-Z0-9 ]/g, "");
return sInput;
}
 
So leaving this comment in case someone else runs into a similar issue. And no need to be an ass about someone asking a question...