]> git.saurik.com Git - apple/libc.git/blobdiff - regex/FreeBSD/regex.3
Libc-763.13.tar.gz
[apple/libc.git] / regex / FreeBSD / regex.3
index cf46cd4b394cf2cc5a7ad366ded02be3245d85a8..f848d66c3a3c52cd3c6ff8298d2e14eb177867bf 100644 (file)
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -34,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"    @(#)regex.3     8.4 (Berkeley) 3/20/94
-.\" $FreeBSD: src/lib/libc/regex/regex.3,v 1.12 2002/12/19 09:40:23 ru Exp $
+.\" $FreeBSD: src/lib/libc/regex/regex.3,v 1.21 2007/01/09 00:28:04 imp Exp $
 .\"
-.Dd October 2, 2002
+.Dd August 17, 2005
 .Dt REGEX 3
 .Os
 .Sh NAME
@@ -86,7 +82,7 @@ frees any dynamically-allocated storage used by the internal form
 of an RE.
 .Pp
 The header
-.Aq Pa regex.h
+.In regex.h
 declares two structure types,
 .Ft regex_t
 and
@@ -436,7 +432,7 @@ places the NUL-terminated message into the buffer pointed to by
 limiting the length (including the NUL) to at most
 .Fa errbuf_size
 bytes.
-If the whole message won't fit,
+If the whole message will not fit,
 as much of it as will fit before the terminating NUL is supplied.
 In any case,
 the returned value is the size of buffer needed to hold the whole
@@ -564,7 +560,7 @@ or
 .Ql |\&
 cannot appear first or last in a (sub)expression or after another
 .Ql |\& ,
-i.e. an operand of
+i.e., an operand of
 .Ql |\&
 cannot be an empty subexpression.
 An empty parenthesized subexpression,
@@ -588,14 +584,6 @@ and
 beginning and ending subexpressions in obsolete
 .Pq Dq basic
 REs are anchors, not ordinary characters.
-.Sh SEE ALSO
-.Xr grep 1 ,
-.Xr re_format 7
-.Pp
-.St -p1003.2 ,
-sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
 .Sh DIAGNOSTICS
 Non-zero error codes from
 .Fn regcomp
@@ -649,10 +637,20 @@ operand invalid
 .It Dv REG_EMPTY
 empty (sub)expression
 .It Dv REG_ASSERT
-can't happen - you found a bug
+cannot happen - you found a bug
 .It Dv REG_INVARG
-invalid argument, e.g. negative-length string
+invalid argument, e.g.\& negative-length string
+.It Dv REG_ILLSEQ
+illegal byte sequence (bad multibyte character)
 .El
+.Sh SEE ALSO
+.Xr grep 1 ,
+.Xr re_format 7
+.Pp
+.St -p1003.2 ,
+sections 2.8 (Regular Expression Notation)
+and
+B.5 (C Binding for Regular Expression Matching).
 .Sh HISTORY
 Originally written by
 .An Henry Spencer .
@@ -713,7 +711,7 @@ are legal REs because
 is
 a special character only in the presence of a previous unmatched
 .Ql (\& .
-This can't be fixed until the spec is fixed.
+This cannot be fixed until the spec is fixed.
 .Pp
 The standard's definition of back references is vague.
 For example, does
@@ -725,3 +723,5 @@ behavior in such cases should not be relied on.
 .Pp
 The implementation of word-boundary matching is a bit of a kludge,
 and bugs may lurk in combinations of word-boundary matching and anchoring.
+.Pp
+Word-boundary matching does not work properly in multibyte locales.