Re: Perl 5's "non-greedy" matching can be TOO greedy!

[email protected] (Tom Christiansen) Fri, 15 Dec 2000 14:01:57 -0700
Newsgroups perl.perl6.language.regex
Message-ID <18372.976914117@chthon>
>You can't explain why "bbbbccccd" matches without making reference to the
>absolute priority of the leftmost rule.  "bccccd" would still make sense
>(locally) without reference to that rule.

Nope.  Nope, nope, and nope.

Th8is /bbbbccccd/ thing, which is completely unrealistic and
non-real-worldly, says:

	find a 
    b
	such that this is immediately followed by 
    b
	such that this is immediately followed by 
    b
	such that this is immediately followed by 
    b
	such that this is immediately followed by 
    c
	such that this is immediately followed by 
    c
	such that this is immediately followed by 
    c
	such that this is immediately followed by 
    c
	such that this is immediately followed by 
    d

If you think that people for "find a b" to suddently mean 
something stochastic, you know different people than I do.

--tom