[TxMt] Language Grammar: content depending names of captures

Hans-Jörg Bibiko bibiko at eva.mpg.de
Fri Nov 30 11:50:56 UTC 2007


On 30.11.2007, at 10:48, Michael Sheets wrote:

> On Nov 30, 2007, at 3:31 AM, Hans-Jörg Bibiko wrote:
>
>> I only have a tiny question and I didn't find anything in the  
>> archive.
>>
>> 	name = 'meta.tag.any.html';
>> 	begin = '(<)([a-zA-Z0-9:]+)(?=[^>]*></\2>)';
>> 	end = '(>(<)/)(\2)(>)';
>> 	beginCaptures = {
>> 		1 = { name = 'punctuation.definition.tag.html'; };
>> 		2 = { name = 'entity.name.tag.html.$2'; };
>>
>> or
>>
>> 		2 = { name = 'entity.name.tag.html.$self'; };
>>
>> $2 or $self referring to the actual content of the found regexp  
>> group 2 to get:
>
> No, not possible.
It's a pity ;)

--Hans


More information about the textmate mailing list