XP is just a number | |
PerlMonks |
Re: Non-greedy regex behaves greedilyby Anonymous Monk |
on Jul 27, 2008 at 16:49 UTC ( [id://700389]=note: print w/replies, xml ) | Need Help?? |
I would like to reopen this with a similar question. Target string:Back to STATES Menu</font></a></h3> <p align="center"><a href="index.htm"><img src="home2.gif" alt="Home" border="0" width="106" height="30"></a></p> </body> </html> regex:</a>.*?$ or</a>.*?\$ matches:</a></h3> <p align="center"><a href="index.htm"><img src="home2.gif" alt="Home" border="0" width="106" height="30"></a></p> </body> </html> I expect it to match:</a></p> </body> </html> Both PERL and Regex Coach seem to concur, so I must be missing something.
In Section
Seekers of Perl Wisdom
|
|