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

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

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

DESCRIPTION

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