On Friday, August 11, 2006, at 12:40 pm, Patrick Woolsey wrote:
Ben Dougall <[EMAIL PROTECTED]> sez:
on this list i read about (?s) allowing . to catch \r's. but using it
doesn't give the result i'm after. how to match each table row, one
block at a time, in the following?:
[example text snipped]
so i'd like to find one whole tr (from <tr> to the next </tr>) each
time. i tried this:
<tr>((?s).*)</tr>
and that got the whole block (all) of table rows in one go, so tried:
[...]
is there some way to get it to stop at the first </tr> it comes to
rather than the last? that would be nice.
Search for: <tr>((?s).*?)</tr>
As you've already done, prepending (?s) allows the match to span
linebreaks. Then, appending ? makes the match non-greedy, just as you'd
need to do if all the tags were contained on a single line.
yup, that does it. excellent -- thanks.
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>