in reply to Re^3: Non-greedy regex behaves greedily
in thread Non-greedy regex behaves greedily
but there's usually a better way to get what you want done.my $string = q!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>!; if ( $string =~ m!^.*(</a>.*?)$! ) { print "got $1\n"; }
|
|---|