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_synta...
/Björn