docs/70507: RE in BUG section of re_format(7) in obsolete notation
Marian Cerny
jojo at matfyz.cz
Sun Jul 10 15:10:15 UTC 2005
The following reply was made to PR docs/70507; it has been noted by GNATS.
From: Marian Cerny <jojo at matfyz.cz>
To: Giorgos Keramidas <keramida at freebsd.org>
Cc: "Daniel C. Sobral" <dcs at newsguy.com>, bug-followup at freebsd.org,
"Daniel C. Sobral" <dcs at freebsd.org>,
Ruslan Ermilov <ru at freebsd.org>, David O'Brien <obrien at freebsd.org>
Subject: Re: docs/70507: RE in BUG section of re_format(7) in obsolete notation
Date: Sun, 10 Jul 2005 17:08:15 +0200
On 2005-07-10 15:05 +0300, Giorgos Keramidas wrote:
> On 2005-07-09 23:01, "Daniel C. Sobral" <dcs at newsguy.com> wrote:
> >Giorgos Keramidas wrote:
> >>On 2004-08-16 01:30, Marian Cerny <jojo at matfyz.cz> wrote:
> >>> Shouldn't this paragraph in BUGS section in manual page of re_format:
> >>>
> >>> Back references are a dreadful botch, posing major problems for
> >>> efficient implementations. They are also somewhat vaguely
> >>> defined (does `a\(\(b\)*\2\)*d' match `abbbd'?).
> >>> Avoid using them.
> >>>
> >>> be
> >>>
> >>> Back references are a dreadful botch, posing major problems for
> >>> efficient implementations. They are also somewhat vaguely
> >>> defined (does `a((b)*\2)*d' match `abbbd'?).
> >>> Avoid using them.
> >>>
> >>> because `a\(\(b\)*\2\)*d' is in obsolete notation? Or does this bug
> >>> concern only the obsolete REs?
> >>
> >> You're probably right that we should change the syntax to look like a
> >> modern RE. The basic RE syntax is still used by many utils in the base
> >> system though. This is probably why the regexp has remained as you see
> >> it now.
> >>
> >> Daniel, Ruslan and David... what do you think? Is this change ok?
> >
> > Old, OLD messages... This was lost in a number of spams I'm happing to
> > be clearing right now. Thing about back references is... they didn't
> > work with Extended Regex, only with basic Regex, which is the obsolete
> > notation.
> >
> > So I'm guessing the rewritten example wouldn't work, because back
> > references is not supported with that syntax. So, if this change was
> > done, could someone check if back references are actually supported in
> > extended regex (the modern syntax), and, if not, undone this change? :-)
>
> Nothing was changed, since I wasn't sure of what to do.
>
> Thanks for the clarification :-)
Now, when I am reading the manpage once again, i noticed that back
references are not supported in modern REs. But implementation in
FreeBSD (egrep) supports them and the modified example works.
> Does this mean we can close this PR now?
Yes, if back references are not supported by POSIX in modern RE, the PR
can be IMHO closed.
--
Marian Cerny <jojo at matfyz.cz>
Jabber: jojo at njs.netlab.cz
[ UNIX is user friendly. It's just selective about who its friends are. ]
More information about the freebsd-doc
mailing list