developer155
Programmer
Hi,
I need to replace all occurances of a chracter in a string.
So when I do this:
somestring.replace(/;/g,"") it replaces ALL occurances of ; in the string.
But when I do this:
replace(/(/g,"") it throws an error.
Now when I do this: replace("(","") it only replaces 1 occurence of ( in the string. What gives?
Thanks!!
I need to replace all occurances of a chracter in a string.
So when I do this:
somestring.replace(/;/g,"") it replaces ALL occurances of ; in the string.
But when I do this:
replace(/(/g,"") it throws an error.
Now when I do this: replace("(","") it only replaces 1 occurence of ( in the string. What gives?
Thanks!!