Skip to content

Instantly share code, notes, and snippets.

@roooodcastro
Last active August 29, 2015 14:26
Show Gist options
  • Save roooodcastro/0ab07a2d29457f61d497 to your computer and use it in GitHub Desktop.
Save roooodcastro/0ab07a2d29457f61d497 to your computer and use it in GitHub Desktop.
Common Regex refactoring helpers
# Use these with the 'Ctrl+R' IDE function.
# Convert hash rockets to new syntax:
/:([\w_]+) => / => /$1: /
# Convert double-quoted strings to single-quoted strings (avoid ones that can't be converted)
/"([^\n'#{}"]*)"/ => /'$1'/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment