yanivk1984
8/26/2019 - 7:11 AM

javascript replace char with different chart


// replace '_' with ' ' (only for the first occurance)
var res = str.replace("_", " ");

// same as the above but will replace all occurances
string.replace(new RegExp("_", "g"), ' ')