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