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

NAME

6       PCRE - Perl-compatible regular expressions
7

SYNOPSIS

9
10       #include <pcre.h>
11
12       int pcre_exec(const pcre *code, const pcre_extra *extra,
13            const char *subject, int length, int startoffset,
14            int options, int *ovector, int ovecsize);
15

DESCRIPTION

17
18       This  function  matches  a  compiled regular expression against a given
19       subject string, using a matching algorithm that is similar  to  Perl's.
20       It returns offsets to captured substrings. Its arguments are:
21
22         code         Points to the compiled pattern
23         extra        Points to an associated pcre_extra structure,
24                        or is NULL
25         subject      Points to the subject string
26         length       Length of the subject string, in bytes
27         startoffset  Offset in bytes in the subject at which to
28                        start matching
29         options      Option bits
30         ovector      Points to a vector of ints for result offsets
31         ovecsize     Number of elements in the vector (a multiple of 3)
32
33       The options are:
34
35         PCRE_ANCHORED      Match only at the first position
36         PCRE_BSR_ANYCRLF   \R matches only CR, LF, or CRLF
37         PCRE_BSR_UNICODE   \R matches all Unicode line endings
38         PCRE_NEWLINE_ANY   Recognize any Unicode newline sequence
39         PCRE_NEWLINE_ANYCRLF  Recognize CR, LF, and CRLF as newline sequences
40         PCRE_NEWLINE_CR    Set CR as the newline sequence
41         PCRE_NEWLINE_CRLF  Set CRLF as the newline sequence
42         PCRE_NEWLINE_LF    Set LF as the newline sequence
43         PCRE_NOTBOL        Subject is not the beginning of a line
44         PCRE_NOTEOL        Subject is not the end of a line
45         PCRE_NOTEMPTY      An empty string is not a valid match
46         PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
47                              validity (only relevant if PCRE_UTF8
48                              was set at compile time)
49         PCRE_PARTIAL       Return PCRE_ERROR_PARTIAL for a partial match
50
51       There  are  restrictions  on  what may appear in a pattern when partial
52       matching is requested. For details, see the pcrepartial page.
53
54       A pcre_extra structure contains the following fields:
55
56         flags        Bits indicating which fields are set
57         study_data   Opaque data from pcre_study()
58         match_limit  Limit on internal resource use
59         match_limit_recursion  Limit on internal recursion depth
60         callout_data Opaque data passed back to callouts
61         tables       Points to character tables or is NULL
62
63       The  flag  bits  are   PCRE_EXTRA_STUDY_DATA,   PCRE_EXTRA_MATCH_LIMIT,
64       PCRE_EXTRA_MATCH_LIMIT_RECURSION,      PCRE_EXTRA_CALLOUT_DATA,     and
65       PCRE_EXTRA_TABLES.
66
67       There is a complete description of the PCRE native API in  the  pcreapi
68       page and a description of the POSIX API in the pcreposix page.
69
70
71
72                                                                  PCRE_EXEC(3)
Impressum