|
Posted by Tad J McClellan on March 20, 2008, 6:43 am
Please log in for more thread options
>> Venkatesh can....can... wrote:
>> > $var="{' venkat'}->->";
>> > i want to get the "yes" token;
>>
>> $var =~ /.+$/;
>>
>> --
>> Gunnar Hjalmarsson
>> Email:http://www.gunnar.cc/cgi-bin/contact.pl
>
> @gunnar
[ it is bad manners to quote .sigs, please do not do that. ]
> the first .+ is greedy know? it 'll match up to the end right?
Right.
But then the regex engine will notice that the match will fail,
so it "backtracks" and attempts the match again.
How Regexes Work:
http://perl.plover.com/Regex/article.html
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"
|