On May 31, 11:02 am, [EMAIL PROTECTED] (Sharan Basappa) wrote: > I seem to be having some conceptual problem with greedy quantifiers .. > My understanding is that it matches as much as follows while still > allowing rest of the regex to match.
Yes. That is correct. > $str = mississippi; > $str =~ m/m(.*i)(.*pi)/; > I expected first regex (.*i) to match till > ississip No the subpattern (.*i) can't match 'ississip' because the last character of 'ississip' is not 'i'. You seem to have forgotten the ' while still allowing rest of the regex to match' bit. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/