1 |
.TH PCRE 3
|
2 |
.SH NAME
|
3 |
PCRE - Perl-compatible regular expressions
|
4 |
.SH SYNOPSIS
|
5 |
.rs
|
6 |
.sp
|
7 |
.B #include <pcre.h>
|
8 |
.PP
|
9 |
.SM
|
10 |
.br
|
11 |
.B pcre *pcre_compile(const char *\fIpattern\fR, int \fIoptions\fR,
|
12 |
.ti +5n
|
13 |
.B const char **\fIerrptr\fR, int *\fIerroffset\fR,
|
14 |
.ti +5n
|
15 |
.B const unsigned char *\fItableptr\fR);
|
16 |
|
17 |
.SH DESCRIPTION
|
18 |
.rs
|
19 |
.sp
|
20 |
This function compiles a regular expression into an internal form. Its
|
21 |
arguments are:
|
22 |
|
23 |
\fIpattern\fR A zero-terminated string containing the
|
24 |
regular expression to be compiled
|
25 |
\fIoptions\fR Zero or more option bits
|
26 |
\fIerrptr\fR Where to put an error message
|
27 |
\fIerroffset\fR Offset in pattern where error was found
|
28 |
\fItableptr\fR Pointer to character tables, or NULL to
|
29 |
use the built-in default
|
30 |
|
31 |
The option bits are:
|
32 |
|
33 |
PCRE_ANCHORED Force pattern anchoring
|
34 |
PCRE_CASELESS Do caseless matching
|
35 |
PCRE_DOLLAR_ENDONLY $ not to match newline at end
|
36 |
PCRE_DOTALL . matches anything including NL
|
37 |
PCRE_EXTENDED Ignore whitespace and # comments
|
38 |
PCRE_EXTRA PCRE extra features
|
39 |
(not much use currently)
|
40 |
PCRE_MULTILINE ^ and $ match newlines within data
|
41 |
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
|
42 |
theses (named ones available)
|
43 |
PCRE_UNGREEDY Invert greediness of quantifiers
|
44 |
PCRE_UTF8 Run in UTF-8 mode
|
45 |
|
46 |
PCRE must have been compiled with UTF-8 support when PCRE_UTF8 is used.
|
47 |
|
48 |
The yield of the function is a pointer to a private data structure that
|
49 |
contains the compiled pattern, or NULL if an error was detected.
|
50 |
|
51 |
There is a complete description of the PCRE API in the
|
52 |
.\" HREF
|
53 |
\fBpcreapi\fR
|
54 |
.\"
|
55 |
page.
|