Skip to content

Instantly share code, notes, and snippets.

@arumoy
Created September 26, 2018 06:26
Show Gist options
  • Save arumoy/e20ab6670cd14044458af3399f0740ad to your computer and use it in GitHub Desktop.
Save arumoy/e20ab6670cd14044458af3399f0740ad to your computer and use it in GitHub Desktop.
pyperclip snippet to mod clipboard text - make script shortcut and invoke
import pyperclip, re
text = pyperclip.paste()
text = re.sub(r"(\{|\})",r"\\\1",text)
pyperclip.copy(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment