On Thursday 15 Jul 2010 09:51:32 Chandan Kumar wrote:
> Hi ,
>  
> I have query over quantifiers.
>  
> Could you please explain the combination of operators Question mark
> (?),dot(.),star(*),plus(+). 
> Say this is my string:
>  
> $_ = " thiiiiis is my first pattern ,quite confused with quantifiers" 
>  
> ex: (thi.*?) or (thi.+?) etc
>  

".*?" is non-greedy ".*" and ".+?" is non-greedy ".+". See the perldocs for 
more information. They are not equivalent to "*" followed by "?" or "+" 
followed by "?".

Regards,

        Shlomi Fish

P.S: next time please don't start a new thread by replying to an existing 
message as threaded mailers can tell this is the case. Instead, send a new 
message to beginn...@perl.org.

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Why I Love Perl - http://shlom.in/joy-of-perl

God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to