From owner-freebsd-bugs Sat Feb 14 09:10:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA13757 for freebsd-bugs-outgoing; Sat, 14 Feb 1998 09:10:03 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA13751; Sat, 14 Feb 1998 09:10:02 -0800 (PST) (envelope-from gnats) Date: Sat, 14 Feb 1998 09:10:02 -0800 (PST) Message-Id: <199802141710.JAA13751@hub.freebsd.org> To: freebsd-bugs Cc: From: Oliver Fromme Subject: Re: docs/5708: Small bug in re_format(7) manual page. Reply-To: Oliver Fromme Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR docs/5708; it has been noted by GNATS. From: Oliver Fromme To: sprice@hiwaay.net (Steve Price) Cc: freebsd-gnats-submit@freebsd.org, oliver.fromme@heim3.tu-clausthal.de Subject: Re: docs/5708: Small bug in re_format(7) manual page. Date: Sat, 14 Feb 1998 18:05:28 +0100 (MET) Steve Price wrote: > >Description > > > > According to the re_format() manual page: > > > > Obsolete (``basic'') regular expressions differ in several > > respects. `|', `+', and `?' are ordinary characters and > > there is no equivalent for their functionality. > > > > This is not completely correct. `x+' is equivalent to `xx*' or > > `x\{1,\}', and `x?' is equivalent to `x\{0,1\}'. > > Actually what the manpage says is correct. 'man 3 regex' and > you will see REG_BASIC. If (cflags & REG_BASIC) is non-zero in a > call regcomp(3), then the |, +, and ? characters are not expanded. > They are only treated special when (cflags & REG_EXTENDED) is > non-zero in a call to regcomp(3). That is NOT the bug that I was reporting. The manpage IS incorrect in saying that there is no equivalent for the functionality of "+" and "?" in basic REs. I'm sorry if my description wasn't clear enough. "+" in extended REs is equivalent to "\{1,\}" in basic REs, and "?" in extended REs is equivalent to "\{0,1\}" in basic REs. I think that I expressed this quite clear in the diff that I included with my PR. Should I re-open this with another PR, or can we get it fixed without that? Regards Oliver -- Oliver Fromme, Leibnizstr. 18-61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message