On 29-Jan-2007, at 09:25, Ronald J Kimball wrote:
At this point, we need to get tricky.  The problem with the .*? in
(?s)<td.*?</td>.*?</tr> is that they can match <td> and </td>. We need to only allow them to match strings that don't contain a <td> or </ td>. This
can be done with a negative look-ahead assertion:
  (?s)<td(?:(?!</?td).)*</td>(?:(?!</?td).)*</tr>

Ah yes, this is the part where my eyes glaze over and my brain goes into full-on rejection mode.

How you get from (?s)<td.*?</td>.*?</tr> to that is where I 'jump the shark'.

I think it is the (?:(? part of it that really scrambles my brain. the !</?td> makes sense to me.

(?:(?!</?td).)* means check that the next thing in the string isn't </?td, then match one character, then check again, and so on.

Nicely explained.  What's the ':' doing there, just a separator?


--
It was a fifty-four with a mashed up door and a cheesy little amp with a sign on the front said "Fender Champ" and a second-hand guitar it was a Stratocaster with a whammy bar




--
------------------------------------------------------------------
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]>

Reply via email to