<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Feb 21, 2006, at 3:05 PM, Andy Armstrong wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">I haven't read that in the documentation - but it /does/ work. I tested the pattern I posted in TM before I posted it.</FONT></P></BLOCKQUOTE></DIV><DIV><FONT class="Apple-style-span" color="#0000DD"><BR class="khtml-block-placeholder"></FONT></DIV>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.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.</DIV><DIV>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....</DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.<DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Haris</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>