diff options
Diffstat (limited to 'usr/src/man/man3c/regcomp.3c')
-rw-r--r-- | usr/src/man/man3c/regcomp.3c | 81 |
1 files changed, 9 insertions, 72 deletions
diff --git a/usr/src/man/man3c/regcomp.3c b/usr/src/man/man3c/regcomp.3c index 9bee9c808f..1b893e3531 100644 --- a/usr/src/man/man3c/regcomp.3c +++ b/usr/src/man/man3c/regcomp.3c @@ -1,13 +1,13 @@ '\" te .\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. -.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH regcomp 3C "1 Nov 2003" "SunOS 5.11" "Standard C Library Functions" +.TH REGCOMP 3C "Nov 1, 2003" .SH NAME regcomp, regexec, regerror, regfree \- regular expression matching .SH SYNOPSIS @@ -48,12 +48,10 @@ These functions interpret \fIbasic\fR and \fIextended\fR regular expressions The structure type \fBregex_t\fR contains at least the following member: .sp .ne 2 -.mk .na \fB\fBsize_t\fR \fBre_nsub\fR\fR .ad .RS 18n -.rt Number of parenthesised subexpressions. .RE @@ -62,23 +60,19 @@ Number of parenthesised subexpressions. The structure type \fBregmatch_t\fR contains at least the following members: .sp .ne 2 -.mk .na \fB\fBregoff_t\fR \fBrm_so\fR\fR .ad .RS 18n -.rt Byte offset from start of \fIstring\fR to start of substring. .RE .sp .ne 2 -.mk .na \fB\fBregoff_t\fR \fBrm_eo\fR\fR .ad .RS 18n -.rt Byte offset from start of \fIstring\fR of the first character after the end of substring. .RE @@ -93,45 +87,37 @@ bitwise inclusive \fBOR\fR of zero or more of the following flags, which are defined in the header \fB<regex.h>\fR: .sp .ne 2 -.mk .na \fB\fBREG_EXTENDED\fR\fR .ad .RS 16n -.rt Use Extended Regular Expressions. .RE .sp .ne 2 -.mk .na \fB\fBREG_ICASE\fR\fR .ad .RS 16n -.rt Ignore case in match. .RE .sp .ne 2 -.mk .na \fB\fBREG_NOSUB\fR\fR .ad .RS 16n -.rt Report only success/fail in \fBregexec()\fR. .RE .sp .ne 2 -.mk .na \fB\fBREG_NEWLINE\fR\fR .ad .RS 16n -.rt Change the handling of \fBNEWLINE\fR characters, as described in the text. .RE @@ -156,12 +142,10 @@ inclusive \fBOR\fR of zero or more of the following flags, which are defined in the header <\fBregex.h\fR>: .sp .ne 2 -.mk .na \fB\fBREG_NOTBOL\fR\fR .ad .RS 14n -.rt The first character of the string pointed to by \fIstring\fR is not the beginning of the line. Therefore, the circumflex character (\fI^\fR), when taken as a special character, will not match the beginning of \fIstring\fR. @@ -169,12 +153,10 @@ taken as a special character, will not match the beginning of \fIstring\fR. .sp .ne 2 -.mk .na \fB\fBREG_NOTEOL\fR\fR .ad .RS 14n -.rt The last character of the string pointed to by \fIstring\fR is not the end of the line. Therefore, the dollar sign (\fI$\fR), when taken as a special character, will not match the end of \fIstring\fR. @@ -208,12 +190,10 @@ determine which substrings to report in \fIpmatch\fR when matching regular expressions: .sp .ne 2 -.mk .na \fB1.\fR .ad .RS 6n -.rt If subexpression \fIi\fR in a regular expression is not contained within another subexpression, and it participated in the match several times, then the byte offsets in \fIpmatch\fR\fB[\fR\fIi\fR\fB]\fR will delimit the last such @@ -222,12 +202,10 @@ match. .sp .ne 2 -.mk .na \fB2.\fR .ad .RS 6n -.rt If subexpression \fIi\fR is not contained within another subexpression, and it did not participate in an otherwise successful match, the byte offsets in \fIpmatch\fR\fB[\fR\fIi\fR\fB]\fR will be \fB\(mi1\fR\&. A subexpression does @@ -246,12 +224,10 @@ or another, and the other subexpression matched. .sp .ne 2 -.mk .na \fB3.\fR .ad .RS 6n -.rt If subexpression \fIi\fR is contained within another subexpression \fIj\fR, and \fIi\fR is not contained within any other subexpression that is contained within \fIj\fR, and a match of subexpression \fIj\fR is reported in @@ -263,12 +239,10 @@ within \fIj\fR, and a match of subexpression \fIj\fR is reported in .sp .ne 2 -.mk .na \fB4.\fR .ad .RS 6n -.rt If subexpression \fIi\fR is contained in subexpression \fIj\fR, and the byte offsets in \fIpmatch\fR\fB[\fR\fIj\fR\fB]\fR are \fB\(mi1\fR, then the pointers in \fIpmatch\fR\fB[\fR\fIi\fR\fB]\fR also will be \fB\(mi1\fR\&. @@ -276,12 +250,10 @@ in \fIpmatch\fR\fB[\fR\fIi\fR\fB]\fR also will be \fB\(mi1\fR\&. .sp .ne 2 -.mk .na \fB5.\fR .ad .RS 6n -.rt If subexpression \fIi\fR matched a zero-length string, then both byte offsets in \fIpmatch\fR\fB[\fR\fIi\fR\fB]\fR will be the byte offset of the character or \fINULL\fR terminator immediately following the zero-length string. @@ -299,24 +271,20 @@ in \fIpattern\fR or \fIstring\fR will be treated as an ordinary character. If except as follows: .sp .ne 2 -.mk .na \fB1.\fR .ad .RS 6n -.rt A \fBNEWLINE\fR character in \fIstring\fR will not be matched by a period outside a bracket expression or by any form of a non-matching list. .RE .sp .ne 2 -.mk .na \fB2.\fR .ad .RS 6n -.rt A circumflex (^) in \fIpattern\fR, when used to specify expression anchoring will match the zero-length string immediately after a newline in \fIstring\fR, regardless of the setting of \fBREG_NOTBOL\fR. @@ -324,12 +292,10 @@ regardless of the setting of \fBREG_NOTBOL\fR. .sp .ne 2 -.mk .na \fB3.\fR .ad .RS 6n -.rt A dollar-sign ($) in \fIpattern\fR, when used to specify expression anchoring, will match the zero-length string immediately before a newline in \fIstring\fR, regardless of the setting of \fBREG_NOTEOL.\fR @@ -345,156 +311,128 @@ associated with \fIpreg\fR. The following constants are defined as error return values: .sp .ne 2 -.mk .na \fB\fBREG_NOMATCH\fR\fR .ad .RS 16n -.rt The \fBregexec()\fR function failed to match. .RE .sp .ne 2 -.mk .na \fB\fBREG_BADPAT\fR\fR .ad .RS 16n -.rt Invalid regular expression. .RE .sp .ne 2 -.mk .na \fB\fBREG_ECOLLATE\fR\fR .ad .RS 16n -.rt Invalid collating element referenced. .RE .sp .ne 2 -.mk .na \fB\fBREG_ECTYPE\fR\fR .ad .RS 16n -.rt Invalid character class type referenced. .RE .sp .ne 2 -.mk .na \fB\fBREG_EESCAPE\fR\fR .ad .RS 16n -.rt Trailing \e in pattern. .RE .sp .ne 2 -.mk .na \fB\fBREG_ESUBREG\fR\fR .ad .RS 16n -.rt Number in \e\fIdigit\fR invalid or in error. .RE .sp .ne 2 -.mk .na \fB\fBREG_EBRACK\fR\fR .ad .RS 16n -.rt \fB[\|]\fR imbalance. .RE .sp .ne 2 -.mk .na \fB\fBREG_ENOSYS\fR\fR .ad .RS 16n -.rt The function is not supported. .RE .sp .ne 2 -.mk .na \fB\fBREG_EPAREN\fR\fR .ad .RS 16n -.rt \fB\e(\|\e)\fR or \fB()\fR imbalance. .RE .sp .ne 2 -.mk .na \fB\fBREG_EBRACE\fR\fR .ad .RS 16n -.rt \e{ \e} imbalance. .RE .sp .ne 2 -.mk .na \fB\fBREG_BADBR\fR\fR .ad .RS 16n -.rt Content of \e{ \e} invalid: not a number, number too large, more than two numbers, first larger than second. .RE .sp .ne 2 -.mk .na \fB\fBREG_ERANGE\fR\fR .ad .RS 16n -.rt Invalid endpoint in range expression. .RE .sp .ne 2 -.mk .na \fB\fBREG_ESPACE\fR\fR .ad .RS 16n -.rt Out of memory. .RE .sp .ne 2 -.mk .na \fB\fBREG_BADRPT\fR\fR .ad .RS 16n -.rt ?, * or + not preceded by valid regular expression. .RE @@ -632,17 +570,16 @@ See \fBattributes\fR(5) for descriptions of the following attributes: .sp .TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE +box; +c | c +l | l . +ATTRIBUTE TYPE ATTRIBUTE VALUE _ -CSIEnabled +CSI Enabled _ -Interface StabilityStandard +Interface Stability Standard _ -MT-LevelMT-Safe with exceptions +MT-Level MT-Safe with exceptions .TE .SH SEE ALSO |