<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 27 Aug 2007, at 04:02, Nicholas Cole wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><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; ">Textmate is very good at working out which close brace goes with which open brace, but as far as I can see that ability is not available when doing a search and replace. Is that right?</SPAN></BLOCKQUOTE></DIV><BR><DIV>You could work up a macro using the Select → Enclosing Brackets function.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>A simple example: Start recording a macro, do a find for “\footnote{”, press → once, press ⇧⌘B to select the enclosing brackets.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>At this point you’ll have the brackets and contents of the footnote selected and can do what you want with them.</DIV></BODY></HTML>