/[pcre]/code/trunk/doc/pcre_compile2.3
ViewVC logotype

Contents of /code/trunk/doc/pcre_compile2.3

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (show annotations) (download)
Sat Feb 24 21:41:42 2007 UTC (7 years, 7 months ago) by nigel
File size: 2607 byte(s)
Load pcre-7.0 into code/trunk.

1 .TH PCRE_COMPILE2 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_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
12 .ti +5n
13 .B int *\fIerrorcodeptr\fP,
14 .ti +5n
15 .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
16 .ti +5n
17 .B const unsigned char *\fItableptr\fP);
18 .
19 .SH DESCRIPTION
20 .rs
21 .sp
22 This function compiles a regular expression into an internal form. It is the
23 same as \fBpcre_compile()\fP, except for the addition of the \fIerrorcodeptr\fP
24 argument. The arguments are:
25
26 .sp
27 \fIpattern\fR A zero-terminated string containing the
28 regular expression to be compiled
29 \fIoptions\fR Zero or more option bits
30 \fIerrorcodeptr\fP Where to put an error code
31 \fIerrptr\fR Where to put an error message
32 \fIerroffset\fR Offset in pattern where error was found
33 \fItableptr\fR Pointer to character tables, or NULL to
34 use the built-in default
35 .sp
36 The option bits are:
37 .sp
38 PCRE_ANCHORED Force pattern anchoring
39 PCRE_AUTO_CALLOUT Compile automatic callouts
40 PCRE_CASELESS Do caseless matching
41 PCRE_DOLLAR_ENDONLY $ not to match newline at end
42 PCRE_DOTALL . matches anything including NL
43 PCRE_DUPNAMES Allow duplicate names for subpatterns
44 PCRE_EXTENDED Ignore whitespace and # comments
45 PCRE_EXTRA PCRE extra features
46 (not much use currently)
47 PCRE_FIRSTLINE Force matching to be before newline
48 PCRE_MULTILINE ^ and $ match newlines within data
49 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
50 PCRE_NEWLINE_CR Set CR as the newline sequence
51 PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
52 PCRE_NEWLINE_LF Set LF as the newline sequence
53 PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
54 theses (named ones available)
55 PCRE_UNGREEDY Invert greediness of quantifiers
56 PCRE_UTF8 Run in UTF-8 mode
57 PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
58 validity (only relevant if
59 PCRE_UTF8 is set)
60 .sp
61 PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and
62 PCRE_NO_UTF8_CHECK.
63 .P
64 The yield of the function is a pointer to a private data structure that
65 contains the compiled pattern, or NULL if an error was detected.
66 .P
67 There is a complete description of the PCRE native API in the
68 .\" HREF
69 \fBpcreapi\fR
70 .\"
71 page and a description of the POSIX API in the
72 .\" HREF
73 \fBpcreposix\fR
74 .\"
75 page.

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12