Page 1 of 1

Javascript concatenation

Posted: Thu Dec 11, 2008 1:33 am
by littlecoder
Hello
var str = "100+100";
Is there any way in which i can replace the '+' in str , after searching the string with another character in Javascript ?

Re: Javascript concatenation

Posted: Thu Dec 11, 2008 4:30 am
by Eran

Code: Select all

 
var str = "100+100";
str.replace(new RegExp("+"),"anotherCharacter");