I simply want to replace all the +'s in a url string with spaces but I get an error with the following code because it is treating the + as a quantifier.
var str="blah+blah";str=str.replace(/+/g, " ");
How do I make this work?
>>> str = 'blah+blah';
>>> str = 'blah+blah+blah';
>>> str.replace(/\\+/, '')
>>> str.replace(/\\+/g, '')
Directly from firebug js console
This topic is now closed. New replies are no longer allowed.