1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->
<html>
<head>
<title>PCRE(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>
<h2><a name='sect0' href='#toc0'>Name</a></h2>
PCRE - Perl-compatible regular expressions
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<p>
<b>#include <pcre.h></b> <p>
<font size='-1'></font>
<br>
<b>int pcre_exec(const pcre *<i>code</i>, "const pcre_extra *<i>extra</i>,"</b> <b>const char
*<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b> <b>int <i>options</i>, int *<i>ovector</i>, int
<i>ovecsize</i>);</b>
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<p>
This function matches a compiled regular expression
against a given subject string, and returns offsets to capturing subexpressions.
Its arguments are: <p>
<i>code</i> Points to the compiled pattern<br>
<i>extra</i> Points to an associated <b>pcre_extra</b> structure,<br>
or is NULL<br>
<i>subject</i> Points to the subject string<br>
<i>length</i> Length of the subject string, in bytes<br>
<i>startoffset</i> Offset in bytes in the subject at which to<br>
start matching<br>
<i>options</i> Option bits<br>
<i>ovector</i> Points to a vector of ints for result offsets<br>
<i>ovecsize</i> Number of elements in the vector (a multiple of 3)<br>
<p>
The options are: <p>
PCRE_ANCHORED Match only at the first position<br>
PCRE_NOTBOL Subject is not the beginning of a line<br>
PCRE_NOTEOL Subject is not the end of a line<br>
PCRE_NOTEMPTY An empty string is not a valid match<br>
PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8<br>
validity (only relevant if PCRE_UTF8<br>
was set at compile time)<br>
PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match<br>
<p>
There are restrictions on what may appear in a pattern when partial matching
is requested. <p>
A <b>pcre_extra</b> structure contains the following fields: <p>
<i>flags</i>
Bits indicating which fields are set<br>
<i>study_data</i> Opaque data from <b>pcre_study()</b><br>
<i>match_limit</i> Limit on internal recursion<br>
<i>callout_data</i> Opaque data passed back to callouts<br>
<i>tables</i> Points to character tables or is NULL<br>
<p>
The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT, PCRE_EXTRA_CALLOUT_DATA,
and PCRE_EXTRA_TABLES. <p>
There is a complete description of the PCRE native
API in the <b>pcreapi</b> page and a description of the POSIX API in the <b>pcreposix</b>
page. <p>
<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
</ul>
</body>
</html>
|