>Really? I haven't taken a survey, but I did ask one co-worker for his >first impression of what the regexp (from my example) would match. Not >being an experienced Perl programmer, but being familiar with regular >expressions, he believed he understood the idea of non-greedy matching. >His expectation? That would match "bccccd", not "bbbbccccd". I'm sure you invalidated the test results by giving the wrong set up. Listen very closely: PERL DOES NOT HAVE GREEDY MATCHING. Got that? Neither does it have stingy matching. Only the quantifiers have such a property. NOT THE MATCH ITSELF. Wait, let me say it again: PERL DOES NOT HAVE GREEDY MATCHING. There is no global greed, only local greed. And greed is a misleading term. --tom
- Re: Perl 5's "non-greedy&quo... Deven T. Corzine
- Re: Perl 5's "non-greedy... Tom Christiansen
- Re: Perl 5's "non-greedy... Tom Christiansen
- Re: Perl 5's "non-greedy... Deven T. Corzine
- Re: Perl 5's "non-greedy" matching c... Tom Christiansen
- Re: Perl 5's "non-greedy" matching can be TOO... brian d foy
- Re: Perl 5's "non-greedy" matching can b... Deven T. Corzine
- Re: Perl 5's "non-greedy" matching c... Randal L. Schwartz
- Re: Perl 5's "non-greedy" matchi... Deven T. Corzine
- Re: Perl 5's "non-greedy" ma... Tom Christiansen
- Re: Perl 5's "non-greedy" ma... Tom Christiansen
- Re: Perl 5's "non-greedy" matching c... Uri Guttman
- Re: Perl 5's "non-greedy" matching c... Tom Christiansen
- Re: Perl 5's "non-greedy" matching can be TOO... Nathan Wiger