[TxMt] Re: Help with a Language Regex?

Allan Odgaard mailinglist at textmate.org
Sun Jan 30 11:42:35 UTC 2011


On 25 Jan 2011, at 00:51, Charles Turner wrote:

> Stumped over the following regex for a block comment:
> 
>> begin = '(?<=0 : 0$)';
> 
> This actually works, but I need to generalize it to one or more whitespace characters between the "0" and ":", and then between the colon and final zero.

Can you quote the rule for block comments?

Look-behind is generally a bad thing to use in grammars, so I would suggest you revise your approach. Normally this is done by matching the stuff leading up to the block comment (setting the right context).



More information about the textmate mailing list