[TxMt] Re: TM2: how to select blocks without pair chars

Erik Neumann erikn at myphysicslab.com
Tue Mar 27 16:23:44 UTC 2012


Here is a regexp that might do the trick:

(?<=\()[^\(\)]+

how it works:

(?<=\()  look-behind for a (

[^\(\)]+   chars that are not ( or )

Question for the regexp guru's on this list:   Why does using both
look-behind and look-ahead like below fail?

(?<=\().*(?=\))

--ErikN


Regards,

--ErikN


2012/3/26 Yuan Jiang <sleetdrop at gmail.com>

> eg:
> ($i++)
>
> when I use Edit->Select->Enclosing Typing Pairs
>
> I just want to select $i++, not ($i++)
>
> how can I achieve this.
>
>
>
>  Yuan Jiang
> http://blog.vetcafe.net
> http://twitter.com/sleetdrop
>
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20120327/fad1315d/attachment.html>


More information about the textmate mailing list