Microsoft Techies
Microsoft information center.
Friday, 12 September 2014
javascript string replace all
var str = "Hello world, welcome to the universe.";
//I am going to replace , with | and space with -
var newString=str.toLowerCase().replace(/,/g, "|").replace(/ /g,'-');
Newer Post
Older Post
Home