Skip to content

Instantly share code, notes, and snippets.

@twetzel
Last active December 18, 2015 16:49
Show Gist options
  • Save twetzel/5813709 to your computer and use it in GitHub Desktop.
Save twetzel/5813709 to your computer and use it in GitHub Desktop.
regular expression to change ruby hash syntax for TextMate | Sublime | etc

Old => New:

Find:
  :(\w+)[\s]+=>[\s]+
Replace:
  $1: 

New => Old:

Find:
  [\s]+(\w+):[\s]+
Replace:
   :$1 => 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment