Skip to content

Instantly share code, notes, and snippets.

@mildfuzz
Created November 2, 2012 12:06
Show Gist options
  • Select an option

  • Save mildfuzz/4000754 to your computer and use it in GitHub Desktop.

Select an option

Save mildfuzz/4000754 to your computer and use it in GitHub Desktop.
String.prototype.recursiveReplace = function(a,b){
var newString = this;
while(newString.match(a) !== null){newString = newString.replace(a,b);}
return newString;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment