| 1 |
.TH PCRE 3 |
.TH PCRE_EXEC 3 |
| 2 |
.SH NAME |
.SH NAME |
| 3 |
PCRE - Perl-compatible regular expressions |
PCRE - Perl-compatible regular expressions |
| 4 |
.SH SYNOPSIS |
.SH SYNOPSIS |
| 7 |
.B #include <pcre.h> |
.B #include <pcre.h> |
| 8 |
.PP |
.PP |
| 9 |
.SM |
.SM |
|
.br |
|
| 10 |
.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," |
.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP," |
| 11 |
.ti +5n |
.ti +5n |
| 12 |
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, |
.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP, |
| 34 |
The options are: |
The options are: |
| 35 |
.sp |
.sp |
| 36 |
PCRE_ANCHORED Match only at the first position |
PCRE_ANCHORED Match only at the first position |
| 37 |
|
PCRE_NEWLINE_ANY Recognize any Unicode newline sequence |
| 38 |
|
PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences |
| 39 |
|
PCRE_NEWLINE_CR Set CR as the newline sequence |
| 40 |
|
PCRE_NEWLINE_CRLF Set CRLF as the newline sequence |
| 41 |
|
PCRE_NEWLINE_LF Set LF as the newline sequence |
| 42 |
PCRE_NOTBOL Subject is not the beginning of a line |
PCRE_NOTBOL Subject is not the beginning of a line |
| 43 |
PCRE_NOTEOL Subject is not the end of a line |
PCRE_NOTEOL Subject is not the end of a line |
| 44 |
PCRE_NOTEMPTY An empty string is not a valid match |
PCRE_NOTEMPTY An empty string is not a valid match |
| 48 |
PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match |
PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match |
| 49 |
.sp |
.sp |
| 50 |
There are restrictions on what may appear in a pattern when partial matching is |
There are restrictions on what may appear in a pattern when partial matching is |
| 51 |
requested. |
requested. For details, see the |
| 52 |
|
.\" HREF |
| 53 |
|
\fBpcrepartial\fP |
| 54 |
|
.\" |
| 55 |
|
page. |
| 56 |
.P |
.P |
| 57 |
A \fBpcre_extra\fP structure contains the following fields: |
A \fBpcre_extra\fP structure contains the following fields: |
| 58 |
.sp |
.sp |
| 59 |
\fIflags\fP Bits indicating which fields are set |
\fIflags\fP Bits indicating which fields are set |
| 60 |
\fIstudy_data\fP Opaque data from \fBpcre_study()\fP |
\fIstudy_data\fP Opaque data from \fBpcre_study()\fP |
| 61 |
\fImatch_limit\fP Limit on internal recursion |
\fImatch_limit\fP Limit on internal resource use |
| 62 |
|
\fImatch_limit_recursion\fP Limit on internal recursion depth |
| 63 |
\fIcallout_data\fP Opaque data passed back to callouts |
\fIcallout_data\fP Opaque data passed back to callouts |
| 64 |
\fItables\fP Points to character tables or is NULL |
\fItables\fP Points to character tables or is NULL |
| 65 |
.sp |
.sp |
| 66 |
The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT, |
The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT, |
| 67 |
PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES. |
PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and |
| 68 |
|
PCRE_EXTRA_TABLES. |
| 69 |
.P |
.P |
| 70 |
There is a complete description of the PCRE native API in the |
There is a complete description of the PCRE native API in the |
| 71 |
.\" HREF |
.\" HREF |