in reply to Re: •Re: left-non-greedy regex?
in thread left-non-greedy regex?

That'll just find the first match, with a minimal span within that match. That's still not going to find the shortest of all possible matches.

In other words, it won't find the middle "b" in "abbababba", if you're looking for the "shortest run of b's" as in the other node.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Re: •Re: left-non-greedy regex?

Replies are listed 'Best First'.
Re: •Re: Re: •Re: left-non-greedy regex?
by zby (Vicar) on Mar 26, 2003 at 15:08 UTC
    In his post he proposed two hipothetical maching construct - my answer was concerning the first what he called 'left non greedy', you talk rather about the 'both left and right non greedy'.