<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I just checked in a change that fixes the problem below.  <DIV>Here's what was going on in the regular expression:</DIV><DIV>\part was being matched as a sectioning command becuase a sectioning command can have</DIV><DIV>\part </DIV><DIV>optionally followed by a *</DIV><DIV>optionally followed by a toc entry in []</DIV><DIV>followed by {section name}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The problem was in the toc entry matching. [.*] was a greedy match that was sucking up everything until the ] after the \sqrt.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The hack I put in to fix the problem for now was to say that a toc entry could include any characters except a [. My first though was that the .* inside the square-brackets should be non-greedy and I tried making the whole TOC part of the regular expression non-greedy but neither of those options worked for me.  I'm not sure why....</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Brad</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><DIV><DIV>On May 9, 2005, at 11:54 AM, Charilaos Skiadas wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Bitstream Vera Sans; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 12.0px Bitstream Vera Sans">Thanks, this pretty much fixes the last two examples (modulo the recursion). The problem with<SPAN class="Apple-converted-space"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 12.0px Bitstream Vera Sans">\part[4] $\sqrt[d]{n!}$</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Bitstream Vera Sans; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 12.0px Bitstream Vera Sans">still remains though...</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Bitstream Vera Sans; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 12.0px Bitstream Vera Sans">Well, you can't have everything in life, and given that with TM we have almost everything, I'm content. :-)</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Bitstream Vera Sans; min-height: 13px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 11.0px Bitstream Vera Sans">Thanks,</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Bitstream Vera Sans" size="3" style="font: 11.0px Bitstream Vera Sans">Haris</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">textmate-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:textmate-dev@lists.macromates.com">textmate-dev@lists.macromates.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.macromates.com/mailman/listinfo/textmate-dev">http://lists.macromates.com/mailman/listinfo/textmate-dev</A></DIV> <BR class="Apple-interchange-newline"></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>