View Single Post
Old 06-23-2010, 10:52 PM   #25
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Valloric View Post
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.

Last edited by sherman; 06-23-2010 at 10:56 PM.
sherman is online now   Reply With Quote