How can I use regex to replace all the characters in a string that are either alphabetic, a forward slash, a period or double quotations?
I am able to do letters:
"abcd123/./"".replace(/([^\x00-\x80]|\w)/g, "someReplacementText"));
How can I use regex to replace all the characters in a string that are either alphabetic, a forward slash, a period or double quotations?
I am able to do letters:
"abcd123/./"".replace(/([^\x00-\x80]|\w)/g, "someReplacementText"));
Just place all the characters you want into a non-negated character set:
/[a-zA-Z\/\.\"]/g