Click here to get back home

pattern match

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
pattern match Venkatesh can....can... 03-20-2008
---> Re: pattern match Gunnar Hjalmars...03-20-2008
  ---> Re: pattern match venkatesh.naughty03-20-2008
    ---> Re: pattern match Gunnar Hjalmars...03-20-2008
    `--> Re: pattern match Tad J McClellan03-20-2008
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/"

Similar ThreadsPosted
pattern match July 26, 2005, 3:42 pm
match pattern "not" June 26, 2008, 9:20 am
match pattern ********* August 3, 2008, 4:34 am
pattern match with newline July 27, 2004, 9:07 pm
Use of uninitialized value in pattern match (m//) October 19, 2005, 7:58 am
use of uninitialised value in pattern match (m//) May 17, 2006, 12:21 am
Use of initialized value in pattern match May 18, 2006, 2:10 pm
Problem with pattern match March 8, 2007, 10:07 am
match string by re using some pattern July 25, 2007, 9:44 am
Match repeating pattern September 8, 2007, 2:41 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap