in reply to Re: Mind boggling regex
in thread Mind boggling regex

$word =~ /(e)(?!\1)(.)e/s;
I just tried that regex, and $1, $2, and $3 are all undefined.

Does the look-ahead somehow make all the saved regex matches disappear or something?

Magius_AR

Replies are listed 'Best First'.
Re: Re: Re: Mind boggling regex
by japhy (Canon) on Oct 26, 2001 at 21:43 UTC
    Well, the regex FAILS for the string "eee". Try "eye" instead. And this regex only defines $1 and $2.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;