1PCRE_COMPILE(3)            Library Functions Manual            PCRE_COMPILE(3)
2
3
4

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

9
10       #include <pcre.h>
11
12       pcre *pcre_compile(const char *pattern, int options,
13            const char **errptr, int *erroffset,
14            const unsigned char *tableptr);
15

DESCRIPTION

17
18       This  function  compiles a regular expression into an internal form. It
19       is the same as pcre_compile2(), except for the absence  of  the  errorā€
20       codeptr argument. Its arguments are:
21
22         pattern       A zero-terminated string containing the
23                         regular expression to be compiled
24         options       Zero or more option bits
25         errptr        Where to put an error message
26         erroffset     Offset in pattern where error was found
27         tableptr      Pointer to character tables, or NULL to
28                         use the built-in default
29
30       The option bits are:
31
32         PCRE_ANCHORED         Force pattern anchoring
33         PCRE_AUTO_CALLOUT     Compile automatic callouts
34         PCRE_CASELESS         Do caseless matching
35         PCRE_DOLLAR_ENDONLY   $ not to match newline at end
36         PCRE_DOTALL           . matches anything including NL
37         PCRE_DUPNAMES         Allow duplicate names for subpatterns
38         PCRE_EXTENDED         Ignore whitespace and # comments
39         PCRE_EXTRA            PCRE extra features
40                                 (not much use currently)
41         PCRE_FIRSTLINE        Force matching to be before newline
42         PCRE_MULTILINE        ^ and $ match newlines within data
43         PCRE_NEWLINE_ANY      Recognize any Unicode newline sequence
44         PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
45         PCRE_NEWLINE_CR       Set CR as the newline sequence
46         PCRE_NEWLINE_CRLF     Set CRLF as the newline sequence
47         PCRE_NEWLINE_LF       Set LF as the newline sequence
48         PCRE_NO_AUTO_CAPTURE  Disable numbered capturing paren-
49                                 theses (named ones available)
50         PCRE_UNGREEDY         Invert greediness of quantifiers
51         PCRE_UTF8             Run in UTF-8 mode
52         PCRE_NO_UTF8_CHECK    Do not check the pattern for UTF-8
53                                 validity (only relevant if
54                                 PCRE_UTF8 is set)
55
56       PCRE  must  be  built  with UTF-8 support in order to use PCRE_UTF8 and
57       PCRE_NO_UTF8_CHECK.
58
59       The yield of the function is a pointer to a private data structure that
60       contains  the  compiled pattern, or NULL if an error was detected. Note
61       that compiling regular expressions with one version  of  PCRE  for  use
62       with  a  different  version  is  not  guaranteed  to work and may cause
63       crashes.
64
65       There is a complete description of the PCRE native API in  the  pcreapi
66       page and a description of the POSIX API in the pcreposix page.
67
68
69
70                                                               PCRE_COMPILE(3)
Impressum