On Tue, Sep 04, 2007 at 09:57:44PM +0000, H.Merijn Brand
wrote:
> On Tue, 4 Sep 2007 17:43:58 +0200, "Rafael
Garcia-Suarez"
> <rgarciasuarez gmail.com> wrote:
>
> > On 04/09/07, Richard Foley <Richard.Foley rfi.net> wrote:
> > > Yves, sorry to hang off another email, but
the question of g0 came up in
> > > Vienna too, and I don't recall the answer,
and I thought the subject was
> > > vaguely related...
> >
> > This one has been fixed afterwards, I believe:
> > $ bleadperl -e '/g0/'
> > Reference to invalid group 0 in regex; marked by
<-- HERE in m/g <--
> > HERE 0/ at -e line 1.
>
> IIRC g was suggested to be the complete regex, so
you would not need
> the outmost paren-pair
That doesn't make any sense.
g{} are backreferences, they indicate parts of the *source
string* have
to be repeated. For repeat of parts of the *pattern*, we
have the (?&...)
syntax.
And you certainly cannot mean that the entire match has to
be repeated
inside itself - strings aren't fractals.
Abigail
|