in reply to Re: html tag matching confusion
in thread html tag matching confusion

I think that in this particular instance, .*? ought to be fine, as embedded font tags are not legal (whereas in Ovid's example, embedded "s are fine).

In this case we're looking for stuff between <font ...> and </font> so .*? works a charm, although, if you had code that had:

<font ..> text <font ..> more text </font> and some </font>
you'd get
text <font ..> more text
out. This would be awkward, but a negated character class won't save us. If it is possible that you're getting insane html, then you have to expect bugginess on any regexp we come up with.