Quote:
Originally Posted by Valloric
That will fail to match p elements that have embedded spans in them (or <i>, <b> etc.). It would just silently ignore the whole element.
You should really use "<p class="h1">(.+)</p>" with minimal matching.
|
Sorry, should have been more clear I guess.
I was more talking about situations where you know there is no other tag other than the <p> tag.
I guess I try to be as specific as possible with my regex's these days. May not be strictly necessary. but I find it's good practice for me, as I am still quite the novice at them.
Also, I use Notepad++ as my primary editor, which doesn't have a minimal matching option, and I can't figure out what to use to make the expression lazy, as the '?' doesn't seem to work for this purpose.