summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1998-02-14 18:26:29 +0000
committersteve <steve@FreeBSD.org>1998-02-14 18:26:29 +0000
commit623d77caec9639b94505b72f7c2cbd21a97e3812 (patch)
tree4254a3466b903a491268394b42971e626944a00f /lib
parentee159ceedeb5d55374844cf9cc3e975fb301db88 (diff)
downloadFreeBSD-src-623d77caec9639b94505b72f7c2cbd21a97e3812.zip
FreeBSD-src-623d77caec9639b94505b72f7c2cbd21a97e3812.tar.gz
Note that '+' and '?' are not special characters in basic REs but they
can be simulated using bounds. PR: 5708 Submitted by: Oliver Fromme <oliver.fromme@heim3.tu-clausthal.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/regex/re_format.77
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/regex/re_format.7 b/lib/libc/regex/re_format.7
index db2f634..d663f11 100644
--- a/lib/libc/regex/re_format.7
+++ b/lib/libc/regex/re_format.7
@@ -222,8 +222,11 @@ as an implementation can refuse to accept such REs and remain
POSIX-compliant.
.PP
Obsolete (``basic'') regular expressions differ in several respects.
-`|', `+', and `?' are ordinary characters and there is no equivalent
-for their functionality.
+`|' is an ordinary character and there is no equivalent
+for its functionality.
+`+' and `?' are ordinary characters, and their functionality
+can be expressed using bounds (\&{1,\&} or \&{0,1\&} respectively).
+Also note that `x+' in modern REs is equivalent to `xx*'.
The delimiters for bounds are `\e{' and `\e}',
with `{' and `}' by themselves ordinary characters.
The parentheses for nested subexpressions are `\e(' and `\e)',
OpenPOWER on IntegriCloud