Skip to content

Instantly share code, notes, and snippets.

@qnub
Created December 17, 2018 10:23
Show Gist options
  • Save qnub/e1aee98ab87c2f3bd57d807fe44b3070 to your computer and use it in GitHub Desktop.
Save qnub/e1aee98ab87c2f3bd57d807fe44b3070 to your computer and use it in GitHub Desktop.
PyCharm bytecode to regular string regex replacement

Select "Match case", "Regex" and set "File mask" to "*.py"

Search string: ([\n\s,=\+\[\{\(])b('[^\n]*?'|"[^\n]*?")([\n\s,\]\}\)])
Replace string: $1$2$3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment