str replace regex code example
Example 1: replace all javascript
str.split(search).join(replacement);
Example 2: regex replace /
// replaces all / in a String with _
str = str.replace(/\//g,'_');
str.split(search).join(replacement);
// replaces all / in a String with _
str = str.replace(/\//g,'_');