summaryrefslogtreecommitdiffstats
path: root/man-pages-posix-2013/man0p/regex.h.0p
diff options
context:
space:
mode:
Diffstat (limited to 'man-pages-posix-2013/man0p/regex.h.0p')
-rw-r--r--man-pages-posix-2013/man0p/regex.h.0p209
1 files changed, 209 insertions, 0 deletions
diff --git a/man-pages-posix-2013/man0p/regex.h.0p b/man-pages-posix-2013/man0p/regex.h.0p
new file mode 100644
index 0000000..5d0caa5
--- /dev/null
+++ b/man-pages-posix-2013/man0p/regex.h.0p
@@ -0,0 +1,209 @@
+'\" et
+.TH regex.h "0P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+
+.SH NAME
+regex.h
+\(em regular expression matching types
+.SH SYNOPSIS
+.LP
+.nf
+#include <regex.h>
+.fi
+.SH DESCRIPTION
+The
+.IR <regex.h>
+header shall define the structures and symbolic constants used by the
+\fIregcomp\fR(),
+\fIregexec\fR(),
+\fIregerror\fR(),
+and
+\fIregfree\fR()
+functions.
+.P
+The
+.IR <regex.h>
+header shall define the
+.BR regex_t
+structure type, which shall include at least the following member:
+.sp
+.RS 4
+.nf
+\fB
+size_t re_nsub \fRNumber of parenthesized subexpressions.\fR
+.fi \fR
+.P
+.RE
+.P
+The
+.IR <regex.h>
+header shall define the
+.BR size_t
+type as described in
+.IR <sys/types.h> .
+.P
+The
+.IR <regex.h>
+header shall define the
+.BR regoff_t
+type as a signed integer type that can hold
+the largest value that can be stored in either a
+.BR ptrdiff_t
+type or a
+.BR ssize_t
+type.
+.P
+The
+.IR <regex.h>
+header shall define the
+.BR regmatch_t
+structure type, which shall include at least the following members:
+.sp
+.RS 4
+.nf
+\fB
+regoff_t rm_so \fRByte offset from start of string\fR
+ \fRto start of substring.\fR
+regoff_t rm_eo \fRByte offset from start of string of the\fR
+ \fRfirst character after the end of substring.\fR
+.fi \fR
+.P
+.RE
+.P
+The
+.IR <regex.h>
+header shall define the following symbolic constants for the
+.IR cflags
+parameter to the
+\fIregcomp\fR()
+function:
+.IP REG_EXTENDED 14
+Use Extended Regular Expressions.
+.IP REG_ICASE 14
+Ignore case in match.
+.IP REG_NOSUB 14
+Report only success or fail in
+\fIregexec\fR().
+.IP REG_NEWLINE 14
+Change the handling of
+<newline>.
+.P
+The
+.IR <regex.h>
+header shall define the following symbolic constants for the
+.IR eflags
+parameter to the
+\fIregexec\fR()
+function:
+.IP REG_NOTBOL 14
+The
+<circumflex>
+character (\c
+.BR '^' ),
+when taken as a special character, does not match the beginning of
+.IR string .
+.IP REG_NOTEOL 14
+The
+<dollar-sign>
+(\c
+.BR '$' ),
+when taken as a special character, does not match the end of
+.IR string .
+.P
+The
+.IR <regex.h>
+header shall define the following symbolic constants as error
+return values:
+.IP REG_NOMATCH 14
+\fIregexec\fR()
+failed to match.
+.IP REG_BADPAT 14
+Invalid regular expression.
+.IP REG_ECOLLATE 14
+Invalid collating element referenced.
+.IP REG_ECTYPE 14
+Invalid character class type referenced.
+.IP REG_EESCAPE 14
+Trailing
+<backslash>
+character in pattern.
+.IP REG_ESUBREG 14
+Number in \e\fIdigit\fP invalid or in error.
+.IP REG_EBRACK 14
+.BR \(dq[]\(dq
+imbalance.
+.IP REG_EPAREN 14
+.BR \(dq\e(\e)\(dq
+or
+.BR \(dq()\(dq
+imbalance.
+.IP REG_EBRACE 14
+.BR \(dq\e{\e}\(dq
+imbalance.
+.IP REG_BADBR 14
+Content of
+.BR \(dq\e{\e}\(dq
+invalid: not a number, number too large, more than two numbers, first
+larger than second.
+.IP REG_ERANGE 14
+Invalid endpoint in range expression.
+.IP REG_ESPACE 14
+Out of memory.
+.IP REG_BADRPT 14
+.BR '?' ,
+.BR '*' ,
+or
+.BR '+'
+not preceded by valid regular expression.
+.P
+The following shall be declared as functions and may also be defined
+as macros. Function prototypes shall be provided.
+.sp
+.RS 4
+.nf
+\fB
+int regcomp(regex_t *restrict, const char *restrict, int);
+size_t regerror(int, const regex_t *restrict, char *restrict, size_t);
+int regexec(const regex_t *restrict, const char *restrict, size_t,
+ regmatch_t [restrict], int);
+void regfree(regex_t *);
+.fi \fR
+.P
+.RE
+.P
+The implementation may define additional macros or constants using
+names beginning with REG_.
+.LP
+.IR "The following sections are informative."
+.SH "APPLICATION USAGE"
+None.
+.SH RATIONALE
+None.
+.SH "FUTURE DIRECTIONS"
+None.
+.SH "SEE ALSO"
+.IR "\fB<sys_types.h>\fP"
+.P
+The System Interfaces volume of POSIX.1\(hy2008,
+.IR "\fIregcomp\fR\^(\|)"
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 7, Copyright (C) 2013 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group.
+(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
+event of any discrepancy between this version 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.unix.org/online.html .
+
+Any typographical or formatting errors that appear
+in this page are most likely
+to have been introduced during the conversion of the source files to
+man page format. To report such errors, see
+https://www.kernel.org/doc/man-pages/reporting_bugs.html .