August 15, 2012

JavaScript Replace All Function

JavaScript Replace All Function


function replaceSubstring(inSource, inToReplace, inReplaceWith)
{
return inSource.replace(new RegExp(inToReplace, 'g'),inReplaceWith);
}

Last updated: March 19, 2014