[TxMt] regex question

Charilaos Skiadas cskiadas at uchicago.edu
Tue Feb 21 22:11:45 UTC 2006


On Feb 21, 2006, at 3:05 PM, Andy Armstrong wrote:

> I haven't read that in the documentation - but it /does/ work. I  
> tested the pattern I posted in TM before I posted it.

Did you test it in a language grammar? It works in the find/replace  
menu, but I don't think it works in a grammar, which is what the OP  
wanted.

Oliver: One thing you could try, if these things are hierarchical, is  
to have a begin pattern for the first line, and ending in something  
hopefully meaningful.
In the rules for the content of that scope, you could have a further  
begin-end block, which matches the first line there, and in that  
scope, you could have the content match....
The hard thing is to figure out where these blocks should end. You'd  
probably want them to all end at the same point, which you might be  
able to do with look-aheads, once you know where one of them should end.

Not sure if this is possible, depends on the rest of your syntax I  
guess. But it seems to me that the screenplay should be divided in  
huge "scene" blocks and such, and you syntax should try to match  
those blocks as a whole.

Haris



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


More information about the textmate mailing list