Originally Posted by DiapDealer
But I can't get your expression to misbehave, really. It seems to do (for me anyway) what you've intended it to do. Can you give any examples of code it's matched that you don't think it should match?
<a class="whatever" href="#here">this is a link</a> <a class="other
The whole red part would be matched by the first (.*?), right?