[TxMt] regex question

Timothy Bates timothy.c.bates at gmail.com
Wed Feb 22 14:09:48 UTC 2006


> So I just read in the documentation:
>> [...] it is not possible to use a pattern that matches multiple
>> lines. [...]

Not true  (if you are talking about find and replace searching).

Enable multiline searching using (?m)
 the pattern  "(?m)get.*Kend" will find one match in the following example
text (hit cntrl-cmd-E to open this email in textmate and then select the
pattern and hit cmd-E to try it out

Papers to get
    Newton Morton (Southhampton high IQ geneticist)
    Eaves et al. 2005
    Kendler (and Eaves?) 2005
        Extended phenotype


I like this help page for Oniguruma

http://www.jpsoft.com/help/index.htm?regularexpressionsyntax.htm


Other powerful underused options are:
    (?i) = ignore case (?#greatly simplifies reg ex for words where caps
vary)
    (?# oh yes # allows comments ­ very handy when writing bundles you want
to be more explanatory:-)
    


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060222/957947f5/attachment.html>


More information about the textmate mailing list