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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 975 - (hide annotations) (download) (as text)
Sat Jun 2 11:03:06 2012 UTC (11 months, 2 weeks ago) by ph10
File MIME type: text/html
File size: 4093 byte(s)
Document update for 8.31-RC1 test release.

1 nigel 63 <html>
2     <head>
3     <title>pcre_compile specification</title>
4     </head>
5     <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 nigel 75 <h1>pcre_compile man page</h1>
7     <p>
8     Return to the <a href="index.html">PCRE index page</a>.
9     </p>
10 ph10 111 <p>
11 nigel 75 This page is part of the PCRE HTML documentation. It was generated automatically
12     from the original man page. If there is any nonsense in it, please consult the
13     man page, in case the conversion went wrong.
14 ph10 111 <br>
15 nigel 63 <br><b>
16     SYNOPSIS
17     </b><br>
18     <P>
19     <b>#include &#60;pcre.h&#62;</b>
20     </P>
21     <P>
22     <b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
23     <b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
24     <b>const unsigned char *<i>tableptr</i>);</b>
25     </P>
26 ph10 869 <P>
27     <b>pcre16 *pcre16_compile(PCRE_SPTR16 <i>pattern</i>, int <i>options</i>,</b>
28     <b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
29     <b>const unsigned char *<i>tableptr</i>);</b>
30     </P>
31 nigel 63 <br><b>
32     DESCRIPTION
33     </b><br>
34     <P>
35 nigel 93 This function compiles a regular expression into an internal form. It is the
36 ph10 869 same as <b>pcre[16]_compile2()</b>, except for the absence of the
37     <i>errorcodeptr</i> argument. Its arguments are:
38 nigel 63 <pre>
39     <i>pattern</i> A zero-terminated string containing the
40     regular expression to be compiled
41     <i>options</i> Zero or more option bits
42     <i>errptr</i> Where to put an error message
43     <i>erroffset</i> Offset in pattern where error was found
44     <i>tableptr</i> Pointer to character tables, or NULL to
45     use the built-in default
46 nigel 75 </pre>
47 nigel 63 The option bits are:
48     <pre>
49 ph10 345 PCRE_ANCHORED Force pattern anchoring
50     PCRE_AUTO_CALLOUT Compile automatic callouts
51     PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
52     PCRE_BSR_UNICODE \R matches all Unicode line endings
53     PCRE_CASELESS Do caseless matching
54     PCRE_DOLLAR_ENDONLY $ not to match newline at end
55     PCRE_DOTALL . matches anything including NL
56     PCRE_DUPNAMES Allow duplicate names for subpatterns
57 ph10 975 PCRE_EXTENDED Ignore white space and # comments
58 ph10 345 PCRE_EXTRA PCRE extra features
59     (not much use currently)
60     PCRE_FIRSTLINE Force matching to be before newline
61     PCRE_JAVASCRIPT_COMPAT JavaScript compatibility
62     PCRE_MULTILINE ^ and $ match newlines within data
63     PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
64     PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline
65     sequences
66     PCRE_NEWLINE_CR Set CR as the newline sequence
67     PCRE_NEWLINE_CRLF Set CRLF as the newline sequence
68     PCRE_NEWLINE_LF Set LF as the newline sequence
69     PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
70     theses (named ones available)
71 ph10 869 PCRE_NO_UTF16_CHECK Do not check the pattern for UTF-16
72     validity (only relevant if
73     PCRE_UTF16 is set)
74 ph10 345 PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
75     validity (only relevant if
76     PCRE_UTF8 is set)
77 ph10 535 PCRE_UCP Use Unicode properties for \d, \w, etc.
78 ph10 461 PCRE_UNGREEDY Invert greediness of quantifiers
79 ph10 869 PCRE_UTF16 Run in <b>pcre16_compile()</b> UTF-16 mode
80     PCRE_UTF8 Run in <b>pcre_compile()</b> UTF-8 mode
81 nigel 75 </pre>
82 ph10 869 PCRE must be built with UTF support in order to use PCRE_UTF8/16 and
83     PCRE_NO_UTF8/16_CHECK, and with UCP support if PCRE_UCP is used.
84 nigel 63 </P>
85     <P>
86     The yield of the function is a pointer to a private data structure that
87 ph10 155 contains the compiled pattern, or NULL if an error was detected. Note that
88     compiling regular expressions with one version of PCRE for use with a different
89     version is not guaranteed to work and may cause crashes.
90 nigel 63 </P>
91     <P>
92 nigel 75 There is a complete description of the PCRE native API in the
93 nigel 63 <a href="pcreapi.html"><b>pcreapi</b></a>
94 nigel 75 page and a description of the POSIX API in the
95     <a href="pcreposix.html"><b>pcreposix</b></a>
96 nigel 63 page.
97 nigel 75 <p>
98     Return to the <a href="index.html">PCRE index page</a>.
99     </p>

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