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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 518 - (hide annotations) (download)
Tue May 18 15:47:01 2010 UTC (3 years, 10 months ago) by ph10
File size: 3091 byte(s)
Added PCRE_UCP and related stuff to make \w etc use Unicode properties.

1 nigel 79 .TH PCRE_COMPILE 3
2 nigel 63 .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 nigel 75 .B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
11 nigel 63 .ti +5n
12 nigel 75 .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
13 nigel 63 .ti +5n
14 nigel 75 .B const unsigned char *\fItableptr\fP);
15     .
16 nigel 63 .SH DESCRIPTION
17     .rs
18     .sp
19 nigel 93 This function compiles a regular expression into an internal form. It is the
20     same as \fBpcre_compile2()\fP, except for the absence of the \fIerrorcodeptr\fP
21     argument. Its arguments are:
22 nigel 75 .sp
23 nigel 63 \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 nigel 75 .sp
31 nigel 63 The option bits are:
32 nigel 75 .sp
33 ph10 336 PCRE_ANCHORED Force pattern anchoring
34     PCRE_AUTO_CALLOUT Compile automatic callouts
35     PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
36     PCRE_BSR_UNICODE \eR matches all Unicode line endings
37     PCRE_CASELESS Do caseless matching
38     PCRE_DOLLAR_ENDONLY $ not to match newline at end
39     PCRE_DOTALL . matches anything including NL
40     PCRE_DUPNAMES Allow duplicate names for subpatterns
41     PCRE_EXTENDED Ignore whitespace and # comments
42     PCRE_EXTRA PCRE extra features
43     (not much use currently)
44     PCRE_FIRSTLINE Force matching to be before newline
45     PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
46     PCRE_MULTILINE ^ and $ match newlines within data
47     PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
48 ph10 345 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
49 ph10 336 sequences
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_NO_UTF8_CHECK Do not check the pattern for UTF-8
56     validity (only relevant if
57     PCRE_UTF8 is set)
58 ph10 518 PCRE_UCP Use Unicode properties for \ed, \ew, etc.
59 ph10 456 PCRE_UNGREEDY Invert greediness of quantifiers
60     PCRE_UTF8 Run in UTF-8 mode
61 nigel 75 .sp
62     PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and
63 ph10 518 PCRE_NO_UTF8_CHECK, and with UCP support if PCRE_UCP is used.
64 nigel 75 .P
65 nigel 63 The yield of the function is a pointer to a private data structure that
66 ph10 155 contains the compiled pattern, or NULL if an error was detected. Note that
67     compiling regular expressions with one version of PCRE for use with a different
68     version is not guaranteed to work and may cause crashes.
69 nigel 75 .P
70     There is a complete description of the PCRE native API in the
71 nigel 63 .\" HREF
72     \fBpcreapi\fR
73     .\"
74 nigel 75 page and a description of the POSIX API in the
75     .\" HREF
76     \fBpcreposix\fR
77     .\"
78 nigel 63 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