ViewVC logotype

Contents of /code/trunk/doc/html/pcre_exec.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 75 - (show annotations)
Sat Feb 24 21:40:37 2007 UTC (14 years, 2 months ago) by nigel
File MIME type: text/html
File size: 2833 byte(s)
Error occurred while calculating annotation data.
Load pcre-5.0 into code/trunk.
1 <html>
2 <head>
3 <title>pcre_exec specification</title>
4 </head>
5 <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 <h1>pcre_exec man page</h1>
7 <p>
8 Return to the <a href="index.html">PCRE index page</a>.
9 </p>
10 <p>
11 This page is part of the PCRE HTML documentation. It was generated automatically
12 from the original man page. If there is any nonsense in it, please consult the
13 man page, in case the conversion went wrong.
14 <br>
15 <br><b>
17 </b><br>
18 <P>
19 <b>#include &#60;pcre.h&#62;</b>
20 </P>
21 <P>
22 <b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
23 <b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
24 <b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
25 </P>
26 <br><b>
28 </b><br>
29 <P>
30 This function matches a compiled regular expression against a given subject
31 string, and returns offsets to capturing subexpressions. Its arguments are:
32 <pre>
33 <i>code</i> Points to the compiled pattern
34 <i>extra</i> Points to an associated <b>pcre_extra</b> structure,
35 or is NULL
36 <i>subject</i> Points to the subject string
37 <i>length</i> Length of the subject string, in bytes
38 <i>startoffset</i> Offset in bytes in the subject at which to
39 start matching
40 <i>options</i> Option bits
41 <i>ovector</i> Points to a vector of ints for result offsets
42 <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
43 </pre>
44 The options are:
45 <pre>
46 PCRE_ANCHORED Match only at the first position
47 PCRE_NOTBOL Subject is not the beginning of a line
48 PCRE_NOTEOL Subject is not the end of a line
49 PCRE_NOTEMPTY An empty string is not a valid match
50 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
51 validity (only relevant if PCRE_UTF8
52 was set at compile time)
53 PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
54 </pre>
55 There are restrictions on what may appear in a pattern when partial matching is
56 requested.
57 </P>
58 <P>
59 A <b>pcre_extra</b> structure contains the following fields:
60 <pre>
61 <i>flags</i> Bits indicating which fields are set
62 <i>study_data</i> Opaque data from <b>pcre_study()</b>
63 <i>match_limit</i> Limit on internal recursion
64 <i>callout_data</i> Opaque data passed back to callouts
65 <i>tables</i> Points to character tables or is NULL
66 </pre>
69 </P>
70 <P>
71 There is a complete description of the PCRE native API in the
72 <a href="pcreapi.html"><b>pcreapi</b></a>
73 page and a description of the POSIX API in the
74 <a href="pcreposix.html"><b>pcreposix</b></a>
75 page.
76 <p>
77 Return to the <a href="index.html">PCRE index page</a>.
78 </p>

  ViewVC Help
Powered by ViewVC 1.1.5