On Mon, Mar 26, 2012 at 04:06:40PM -0500, Christopher Stone wrote: > On Mar 26, 2012, at 15:39, Rick Gordon wrote: > > FIND: > > (<th scope="row">.?*)</td> > ______________________________________________________________________ > > Hey Rick, > > Didn't you switch up your non-greedy modifier? > > Find: > > (<th scope="row">.*?)</td> > > Replace: > > \1</th>
This regex will work on the sample text, which has the <th> and </td> on the same line, and no other cells on that line. In general, however, it may match too much; it matches from <th scope="row"> to the next </td>, even with a </th> in between. (e.g. <th scope="row"></th><td></td>) To avoid that issue, you could use the below regex, which will not match a <th scope="row"> that is already closed with a </th>, (and also can match across multiple lines): Find (?s)(<th scope="row">(?>(?!</th>).)*)</td> Replace \1</th> Ronald -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>