Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 1998 09:10:02 -0800 (PST)
From:      Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
To:        freebsd-bugs
Subject:   Re: docs/5708: Small bug in re_format(7) manual page.
Message-ID:  <199802141710.JAA13751@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: Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802141710.JAA13751>