Created
December 7, 2012 03:52
-
-
Save germs12/4230637 to your computer and use it in GitHub Desktop.
Sublime Find and REplace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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