How can I replace a plus sign in JavaScript?
Posted
by William Calleja
on Stack Overflow
See other posts from Stack Overflow
or by William Calleja
Published on 2010-03-18T10:58:07Z
Indexed on
2010/03/18
11:01 UTC
Read the original article
Hit count: 300
I need to make a replace of a plus sign in a javascript string. there might be multiple occurrence of the plus sign so I did this up until now:
myString= myString.replace(/+/g, "");#
This is however breaking up my javascript and causing glitches. How do you escape a '+' sign in a regular expression?
© Stack Overflow or respective owner