Skip to content

Instantly share code, notes, and snippets.

@adhusson
Created November 25, 2010 00:30
Show Gist options
  • Save adhusson/714697 to your computer and use it in GitHub Desktop.
Save adhusson/714697 to your computer and use it in GitHub Desktop.
Convert ruby hashes from 1.8 to 1.9 style. Using perl regexp (I invoke it from vim)
s/:([^ ]*?)( +)=>( +)(.*?)($|,| )/$1:$2$4$5/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment