/[pcre]/code/trunk/doc/html/pcre_exec.html
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 392 - (hide annotations) (download) (as text)
Tue Mar 17 21:30:30 2009 UTC (4 years, 2 months ago) by ph10
File MIME type: text/html
File size: 3525 byte(s)
Update after detrailing for a test release.

1 nigel 63 <html>
2     <head>
3     <title>pcre_exec specification</title>
4     </head>
5     <body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
6 nigel 75 <h1>pcre_exec man page</h1>
7     <p>
8     Return to the <a href="index.html">PCRE index page</a>.
9     </p>
10 ph10 111 <p>
11 nigel 75 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 ph10 111 <br>
15 nigel 63 <br><b>
16     SYNOPSIS
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>
27     DESCRIPTION
28     </b><br>
29     <P>
30     This function matches a compiled regular expression against a given subject
31 nigel 77 string, using a matching algorithm that is similar to Perl's. It returns
32     offsets to captured substrings. Its arguments are:
33 nigel 63 <pre>
34     <i>code</i> Points to the compiled pattern
35     <i>extra</i> Points to an associated <b>pcre_extra</b> structure,
36     or is NULL
37     <i>subject</i> Points to the subject string
38     <i>length</i> Length of the subject string, in bytes
39     <i>startoffset</i> Offset in bytes in the subject at which to
40     start matching
41     <i>options</i> Option bits
42     <i>ovector</i> Points to a vector of ints for result offsets
43 nigel 75 <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
44     </pre>
45 nigel 63 The options are:
46     <pre>
47     PCRE_ANCHORED Match only at the first position
48 ph10 231 PCRE_BSR_ANYCRLF \R matches only CR, LF, or CRLF
49     PCRE_BSR_UNICODE \R matches all Unicode line endings
50 nigel 93 PCRE_NEWLINE_ANY Recognize any Unicode newline sequence
51 ph10 150 PCRE_NEWLINE_ANYCRLF Recognize CR, LF, and CRLF as newline sequences
52 nigel 91 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 nigel 63 PCRE_NOTBOL Subject is not the beginning of a line
56     PCRE_NOTEOL Subject is not the end of a line
57     PCRE_NOTEMPTY An empty string is not a valid match
58 ph10 392 PCRE_NO_START_OPTIMIZE Do not do "start-match" optimizations
59 nigel 71 PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
60     validity (only relevant if PCRE_UTF8
61     was set at compile time)
62 nigel 75 PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
63     </pre>
64     There are restrictions on what may appear in a pattern when partial matching is
65 nigel 93 requested. For details, see the
66     <a href="pcrepartial.html"><b>pcrepartial</b></a>
67     page.
68 nigel 63 </P>
69     <P>
70 nigel 75 A <b>pcre_extra</b> structure contains the following fields:
71     <pre>
72     <i>flags</i> Bits indicating which fields are set
73     <i>study_data</i> Opaque data from <b>pcre_study()</b>
74 nigel 87 <i>match_limit</i> Limit on internal resource use
75     <i>match_limit_recursion</i> Limit on internal recursion depth
76 nigel 75 <i>callout_data</i> Opaque data passed back to callouts
77     <i>tables</i> Points to character tables or is NULL
78     </pre>
79     The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
80 nigel 87 PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA, and
81     PCRE_EXTRA_TABLES.
82 nigel 75 </P>
83     <P>
84     There is a complete description of the PCRE native API in the
85 nigel 63 <a href="pcreapi.html"><b>pcreapi</b></a>
86 nigel 75 page and a description of the POSIX API in the
87     <a href="pcreposix.html"><b>pcreposix</b></a>
88 nigel 63 page.
89 nigel 75 <p>
90     Return to the <a href="index.html">PCRE index page</a>.
91     </p>

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12