Thread: Regex examples
View Single Post
Old 09-25-2012, 02:52 PM   #139
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,602
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Jellby View Post
<a class="whatever" href="#here">this is a link</a> <a class="other" id="something"></a>

The whole red part would be matched by the first (.*?), right?
Yep. I missed that. Quite obvious when you see it all spelled out in red & black.

This discussion is a perfect example of why I've started avoiding (.*?) if at all possible. It'll always bite you in the ass if it can.
DiapDealer is offline   Reply With Quote