var str = "hello, w@*$rld@*$dfd"; var res = str.replace(/@\*\$/g, "''");
Replacing all occurrences of a string in JavaScript
var find = 'abc'; var re = new RegExp(find, 'g'); str = str.replace(re, '');
Improve Question
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)