/[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 1404 - (hide annotations) (download)
Tue Nov 19 15:36:57 2013 UTC (11 months ago) by ph10
File size: 4330 byte(s)
Source tidies for 8.34-RC1.

1 ph10 1363 .TH PCRE_COMPILE2 3 "01 October 2013" "PCRE 8.34"
2 nigel 77 .SH NAME
3     PCRE - Perl-compatible regular expressions
4     .SH SYNOPSIS
5     .rs
6     .sp
7     .B #include <pcre.h>
8     .PP
9 ph10 1339 .nf
10 nigel 77 .B pcre *pcre_compile2(const char *\fIpattern\fP, int \fIoptions\fP,
11 ph10 1339 .B " int *\fIerrorcodeptr\fP,"
12     .B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
13     .B " const unsigned char *\fItableptr\fP);"
14     .sp
15 ph10 868 .B pcre16 *pcre16_compile2(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
16 ph10 1339 .B " int *\fIerrorcodeptr\fP,"
17     .B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
18     .B " const unsigned char *\fItableptr\fP);"
19     .sp
20 chpe 1055 .B pcre32 *pcre32_compile2(PCRE_SPTR32 \fIpattern\fP, int \fIoptions\fP,
21 ph10 1339 .B " int *\fIerrorcodeptr\fP,£
22     .B " const char **\fIerrptr\fP, int *\fIerroffset\fP,"
23     .B " const unsigned char *\fItableptr\fP);"
24     .fi
25 nigel 77 .
26     .SH DESCRIPTION
27     .rs
28     .sp
29     This function compiles a regular expression into an internal form. It is the
30 chpe 1055 same as \fBpcre[16|32]_compile()\fP, except for the addition of the
31 ph10 868 \fIerrorcodeptr\fP argument. The arguments are:
32 ph10 583 .
33 nigel 77 .sp
34 ph10 583 \fIpattern\fP A zero-terminated string containing the
35 nigel 77 regular expression to be compiled
36 ph10 583 \fIoptions\fP Zero or more option bits
37 nigel 77 \fIerrorcodeptr\fP Where to put an error code
38 ph10 583 \fIerrptr\fP Where to put an error message
39     \fIerroffset\fP Offset in pattern where error was found
40     \fItableptr\fP Pointer to character tables, or NULL to
41 nigel 77 use the built-in default
42     .sp
43     The option bits are:
44     .sp
45 ph10 456 PCRE_ANCHORED Force pattern anchoring
46     PCRE_AUTO_CALLOUT Compile automatic callouts
47     PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
48     PCRE_BSR_UNICODE \eR matches all Unicode line endings
49     PCRE_CASELESS Do caseless matching
50     PCRE_DOLLAR_ENDONLY $ not to match newline at end
51     PCRE_DOTALL . matches anything including NL
52     PCRE_DUPNAMES Allow duplicate names for subpatterns
53 ph10 968 PCRE_EXTENDED Ignore white space and # comments
54 ph10 456 PCRE_EXTRA PCRE extra features
55     (not much use currently)
56     PCRE_FIRSTLINE Force matching to be before newline
57     PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
58     PCRE_MULTILINE ^ and $ match newlines within data
59 ph10 1363 PCRE_NEVER_UTF Lock out UTF, e.g. via (*UTF)
60 ph10 456 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
61 ph10 461 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
62 ph10 456 sequences
63     PCRE_NEWLINE_CR Set CR as the newline sequence
64     PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
65     PCRE_NEWLINE_LF Set LF as the newline sequence
66     PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
67     theses (named ones available)
68 ph10 1398 PCRE_NO_AUTO_POSSESS Disable auto-possessification
69 ph10 1404 PCRE_NO_START_OPTIMIZE Disable match-time start optimizations
70 ph10 868 PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
71     validity (only relevant if
72     PCRE_UTF16 is set)
73 chpe 1055 PCRE_NO_UTF32_CHECK Do not check the pattern for UTF-32
74     validity (only relevant if
75     PCRE_UTF32 is set)
76 ph10 456 PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
77     validity (only relevant if
78     PCRE_UTF8 is set)
79 ph10 518 PCRE_UCP Use Unicode properties for \ed, \ew, etc.
80 ph10 456 PCRE_UNGREEDY Invert greediness of quantifiers
81 ph10 868 PCRE_UTF16 Run \fBpcre16_compile()\fP in UTF-16 mode
82 chpe 1055 PCRE_UTF32 Run \fBpcre32_compile()\fP in UTF-32 mode
83 ph10 868 PCRE_UTF8 Run \fBpcre_compile()\fP in UTF-8 mode
84 nigel 77 .sp
85 chpe 1055 PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and
86     PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
87 nigel 77 .P
88     The yield of the function is a pointer to a private data structure that
89 ph10 155 contains the compiled pattern, or NULL if an error was detected. Note that
90     compiling regular expressions with one version of PCRE for use with a different
91     version is not guaranteed to work and may cause crashes.
92 nigel 77 .P
93     There is a complete description of the PCRE native API in the
94     .\" HREF
95 ph10 583 \fBpcreapi\fP
96 nigel 77 .\"
97     page and a description of the POSIX API in the
98     .\" HREF
99 ph10 583 \fBpcreposix\fP
100 nigel 77 .\"
101     page.

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12