Skip to content

Instantly share code, notes, and snippets.

@gertig
Created March 6, 2012 21:36
Show Gist options
  • Save gertig/1989090 to your computer and use it in GitHub Desktop.
Save gertig/1989090 to your computer and use it in GitHub Desktop.
Replace double quotes with two single quotes
var str = "Dear diary "this" is a string with quotes."
str.replace(/"([^"]*)"/g, "''$1''");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment