[TxMt][regex] if A and/or B

José Campos jose.campos+tm at galacsys.com
Fri Apr 8 06:32:36 UTC 2005


    Hi All,

    In order to sort very big log files, I want to add leading
characters to every line.

    For instance, if I want to have lines that contain "you" and/or "me"
sorted first, I used this find/replace template :

    find :      ^.*(you)?.*(me)?.*$
    replace :   ?1(?2(00_$0):(01_$0)):(?2(02_$0):(99_$0))

    Is there a more simple way to achive this?

    Have a nice day,

-- 
  Jo                                         <W:00°04'37" ; N:47°15'36">

1....'....12.....'....24.....'....36.....'....48.....'....60.....'....72



More information about the textmate mailing list