From owner-freebsd-bugs Sat Feb 14 08:50:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA12451 for freebsd-bugs-outgoing; Sat, 14 Feb 1998 08:50:05 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA12441; Sat, 14 Feb 1998 08:50:03 -0800 (PST) (envelope-from gnats) Date: Sat, 14 Feb 1998 08:50:03 -0800 (PST) Message-Id: <199802141650.IAA12441@hub.freebsd.org> To: freebsd-bugs Cc: From: Steve Price Subject: Re: docs/5708: Small bug in re_format(7) manual page. Reply-To: Steve Price 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: Steve Price To: freebsd-gnats-submit@freebsd.org, oliver.fromme@heim3.tu-clausthal.de Cc: Subject: Re: docs/5708: Small bug in re_format(7) manual page. Date: Sat, 14 Feb 1998 10:50:02 -0600 >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). Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message