in reply to Re: Re: Capturing with look-ahead
in thread Capturing with look-ahead

Why is that? (?=) is zero-width, why does it look further one char next time?

Replies are listed 'Best First'.
Re: Re: Re: Re: Capturing with look-ahead
by japhy (Canon) on Mar 04, 2002 at 21:53 UTC
    I direct your attention to perlre, the section named Repeated patterns matching zero-length substring. This complicated section can be summarized by this extract: "the following match after a zero-length match is prohibited to have a length of zero."

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      Thanks!