Skip to content

Instantly share code, notes, and snippets.

@maritz
Created March 8, 2010 22:23
Show Gist options
  • Save maritz/325855 to your computer and use it in GitHub Desktop.
Save maritz/325855 to your computer and use it in GitHub Desktop.
"%>asidn'ASDA'GFA'SDA'<%".replace(/%>(.)*<%/, function(m, escaping) {
return '%>' + escaping.replace(/'/, "\'") + '<%';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment