/[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 954 - (hide annotations) (download)
Sat Mar 31 18:09:26 2012 UTC (2 years, 5 months ago) by ph10
File size: 3567 byte(s)
Add date and PCRE version to .TH macros of all man pages.

1 ph10 954 .TH PCRE_COMPILE 3 "13 January 2012" "PCRE 8.30"
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 ph10 868 .PP
16     .B pcre16 *pcre16_compile(PCRE_SPTR16 \fIpattern\fP, int \fIoptions\fP,
17     .ti +5n
18     .B const char **\fIerrptr\fP, int *\fIerroffset\fP,
19     .ti +5n
20     .B const unsigned char *\fItableptr\fP);
21 nigel 75 .
22 nigel 63 .SH DESCRIPTION
23     .rs
24     .sp
25 nigel 93 This function compiles a regular expression into an internal form. It is the
26 ph10 868 same as \fBpcre[16]_compile2()\fP, except for the absence of the
27     \fIerrorcodeptr\fP argument. Its arguments are:
28 nigel 75 .sp
29 ph10 583 \fIpattern\fP A zero-terminated string containing the
30 nigel 63 regular expression to be compiled
31 ph10 583 \fIoptions\fP Zero or more option bits
32     \fIerrptr\fP Where to put an error message
33     \fIerroffset\fP Offset in pattern where error was found
34     \fItableptr\fP Pointer to character tables, or NULL to
35 nigel 63 use the built-in default
36 nigel 75 .sp
37 nigel 63 The option bits are:
38 nigel 75 .sp
39 ph10 336 PCRE_ANCHORED Force pattern anchoring
40     PCRE_AUTO_CALLOUT Compile automatic callouts
41     PCRE_BSR_ANYCRLF \eR matches only CR, LF, or CRLF
42     PCRE_BSR_UNICODE \eR matches all Unicode line endings
43     PCRE_CASELESS Do caseless matching
44     PCRE_DOLLAR_ENDONLY $ not to match newline at end
45     PCRE_DOTALL . matches anything including NL
46     PCRE_DUPNAMES Allow duplicate names for subpatterns
47     PCRE_EXTENDED Ignore whitespace and # comments
48     PCRE_EXTRA PCRE extra features
49     (not much use currently)
50     PCRE_FIRSTLINE Force matching to be before newline
51     PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
52     PCRE_MULTILINE ^ and $ match newlines within data
53     PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
54 ph10 345 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
55 ph10 336 sequences
56     PCRE_NEWLINE_CR Set CR as the newline sequence
57     PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
58     PCRE_NEWLINE_LF Set LF as the newline sequence
59     PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
60     theses (named ones available)
61 ph10 868 PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
62     validity (only relevant if
63     PCRE_UTF16 is set)
64 ph10 336 PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
65     validity (only relevant if
66     PCRE_UTF8 is set)
67 ph10 518 PCRE_UCP Use Unicode properties for \ed, \ew, etc.
68 ph10 456 PCRE_UNGREEDY Invert greediness of quantifiers
69 ph10 868 PCRE_UTF16 Run in \fBpcre16_compile()\fP UTF-16 mode
70     PCRE_UTF8 Run in \fBpcre_compile()\fP UTF-8 mode
71 nigel 75 .sp
72 ph10 868 PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
73     PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
74 nigel 75 .P
75 nigel 63 The yield of the function is a pointer to a private data structure that
76 ph10 155 contains the compiled pattern, or NULL if an error was detected. Note that
77     compiling regular expressions with one version of PCRE for use with a different
78     version is not guaranteed to work and may cause crashes.
79 nigel 75 .P
80     There is a complete description of the PCRE native API in the
81 nigel 63 .\" HREF
82 ph10 583 \fBpcreapi\fP
83 nigel 63 .\"
84 nigel 75 page and a description of the POSIX API in the
85     .\" HREF
86 ph10 583 \fBpcreposix\fP
87 nigel 75 .\"
88 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