Re: Perl 5's "non-greedy" matching can be TOO greedy!
[email protected] (Tom Christiansen) Fri, 15 Dec 2000 14:25:24 -0700
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <10500.976915524@chthon> |
>That would be a strange regexp, but I never suggested it. I suggested the
>regexp /b.*?d/ and pointed out that I believe "bccccd" is a more intuitive
>match than "bbbbccccd". That was the matching text, not the regexp, sorry
>if I didn't make that clear.
Fine. What you said is
first
find a b
then
find any non-newline, repeated 0 to N times
then
find a d
What part of "first find a b" do you expect a randomizing solution to?
That's very clear.
--tom