Date: Sat, 14 Feb 1998 08:50:03 -0800 (PST) From: Steve Price <sprice@hiwaay.net> To: freebsd-bugs Subject: Re: docs/5708: Small bug in re_format(7) manual page. Message-ID: <199802141650.IAA12441@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/5708; it has been noted by GNATS. From: Steve Price <sprice@hiwaay.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802141650.IAA12441>