Thread: Regex examples
View Single Post
Old 09-25-2012, 11:38 AM   #137
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Yes, it does because it searches for "any character but >" inside the quotes, and that includes the closing quote and the href part.

You probably want something like this:

Code:
<a class="([^"]*?)" id="([^"]*?)"></a>
Anyway, an anchor with href and no text is pretty useless.
Jellby is offline   Reply With Quote