Skip to content

Instantly share code, notes, and snippets.

@SkyM
Created April 9, 2012 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SkyM/2346236 to your computer and use it in GitHub Desktop.
Save SkyM/2346236 to your computer and use it in GitHub Desktop.
Camel case to underscore and back
To convert camelCase to underscores, in TextMate, replace ([a-z])([A-Z]) with $1_\l$2
To convert underscores to camelCase, replace ([a-z]+)_([a-z]+) with $1\u$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment