Skip to content

Instantly share code, notes, and snippets.

@patrickfuller
Created June 27, 2015 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickfuller/6d21d9f176f02d9885f2 to your computer and use it in GitHub Desktop.
Save patrickfuller/6d21d9f176f02d9885f2 to your computer and use it in GitHub Desktop.
Python single quote replacement

The goal is to replace individual double quotes " with single quotes ' without affecting docstring triple double quotes """.

%s/([^"])"([^"])/$1'$2/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment