Skip to content

Instantly share code, notes, and snippets.

@germs12
Created December 7, 2012 03:52
Show Gist options
  • Save germs12/4230637 to your computer and use it in GitHub Desktop.
Save germs12/4230637 to your computer and use it in GitHub Desktop.
Sublime Find and REplace
Good Sublime Text 2 RegEx Example for using back references (Variables for find and replace with regex). (http://www.boost.org/doc/libs/1_47_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html)
Find: xm.(?:([a-zA-Z]*))\{(?:[\n]*)
ex: xm.Status{
Replace: xm.ccr :$1 do \n
ex: xm.ccr :Status do
Find: xm.(?:([a-zA-Z]*))\((?:([a-z.\s|]*))\)
ex: xm.ActorID(self.creator || self.actor)
Replace: xm.ccr :$1 do $2 end
ex: xm.ccr :ActorID do self.creator || self.actor end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment