1 |
<html>
|
2 |
<head>
|
3 |
<title>pcre_compile specification</title>
|
4 |
</head>
|
5 |
<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
|
6 |
This HTML document has been generated automatically from the original man page.
|
7 |
If there is any nonsense in it, please consult the man page, in case the
|
8 |
conversion went wrong.<br>
|
9 |
<br><b>
|
10 |
SYNOPSIS
|
11 |
</b><br>
|
12 |
<P>
|
13 |
<b>#include <pcre.h></b>
|
14 |
</P>
|
15 |
<P>
|
16 |
<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
|
17 |
<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
|
18 |
<b>const unsigned char *<i>tableptr</i>);</b>
|
19 |
</P>
|
20 |
<br><b>
|
21 |
DESCRIPTION
|
22 |
</b><br>
|
23 |
<P>
|
24 |
This function compiles a regular expression into an internal form. Its
|
25 |
arguments are:
|
26 |
</P>
|
27 |
<P>
|
28 |
<pre>
|
29 |
<i>pattern</i> A zero-terminated string containing the
|
30 |
regular expression to be compiled
|
31 |
<i>options</i> Zero or more option bits
|
32 |
<i>errptr</i> Where to put an error message
|
33 |
<i>erroffset</i> Offset in pattern where error was found
|
34 |
<i>tableptr</i> Pointer to character tables, or NULL to
|
35 |
use the built-in default
|
36 |
</PRE>
|
37 |
</P>
|
38 |
<P>
|
39 |
The option bits are:
|
40 |
</P>
|
41 |
<P>
|
42 |
<pre>
|
43 |
PCRE_ANCHORED Force pattern anchoring
|
44 |
PCRE_CASELESS Do caseless matching
|
45 |
PCRE_DOLLAR_ENDONLY $ not to match newline at end
|
46 |
PCRE_DOTALL . matches anything including NL
|
47 |
PCRE_EXTENDED Ignore whitespace and # comments
|
48 |
PCRE_EXTRA PCRE extra features
|
49 |
(not much use currently)
|
50 |
PCRE_MULTILINE ^ and $ match newlines within data
|
51 |
PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
|
52 |
theses (named ones available)
|
53 |
PCRE_UNGREEDY Invert greediness of quantifiers
|
54 |
PCRE_UTF8 Run in UTF-8 mode
|
55 |
PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
|
56 |
validity (only relevant if
|
57 |
PCRE_UTF8 is set)
|
58 |
</PRE>
|
59 |
</P>
|
60 |
<P>
|
61 |
PCRE must be compiled with UTF-8 support in order to use PCRE_UTF8
|
62 |
(or PCRE_NO_UTF8_CHECK).
|
63 |
</P>
|
64 |
<P>
|
65 |
The yield of the function is a pointer to a private data structure that
|
66 |
contains the compiled pattern, or NULL if an error was detected.
|
67 |
</P>
|
68 |
<P>
|
69 |
There is a complete description of the PCRE API in the
|
70 |
<a href="pcreapi.html"><b>pcreapi</b></a>
|
71 |
page.
|