[TxMt] Re: How to insert a letter/sign at the end of matching lines?

Björn Jadelius b at jadelius.se
Wed Apr 6 13:41:51 UTC 2011


> 
> I have a text file with lines like this:
> 
> dog={brown, bark},
> cat={white, purr},
> mouse={gray, beep},
> 
> I would like to end up with this:
> 
> dog={brown, bark},
> cat={{white, purr}},
> mouse={gray, beep},


Try

Find:
^(.*cat={)(.*)(},\s*)$

Replace:
$1{$2}$3

See more about regular expression replace in TextMate here:
http://manual.macromates.com/en/regular_expressions#replacement_string_syntax_format_strings


/Björn

> 


More information about the textmate mailing list