Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing characters

Status
Not open for further replies.

developer155

Programmer
Jan 21, 2004
512
US
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!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top