129 lines
8.4 KiB
HTML
129 lines
8.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE_EXEC</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE_EXEC</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 31 October 2012<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
PCRE - Perl-compatible regular expressions
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<P>
|
|
<B>#include <<A HREF="file:///usr/include/pcre.h">pcre.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>int pcre_jit_exec(const pcre *</B><I>code</I>, const pcre_extra *<I>extra</I>,
|
|
<B> const char *</B><I>subject</I>, int <I>length</I>, int <I>startoffset</I>,
|
|
<B> int </B><I>options</I>, int *<I>ovector</I>, int <I>ovecsize</I>,
|
|
<B> pcre_jit_stack *</B><I>jstack</I>);
|
|
|
|
<B>int pcre16_jit_exec(const pcre16 *</B><I>code</I>, const pcre16_extra *<I>extra</I>,
|
|
<B> PCRE_SPTR16 </B><I>subject</I>, int <I>length</I>, int <I>startoffset</I>,
|
|
<B> int </B><I>options</I>, int *<I>ovector</I>, int <I>ovecsize</I>,
|
|
<B> pcre_jit_stack *</B><I>jstack</I>);
|
|
|
|
<B>int pcre32_jit_exec(const pcre32 *</B><I>code</I>, const pcre32_extra *<I>extra</I>,
|
|
<B> PCRE_SPTR32 </B><I>subject</I>, int <I>length</I>, int <I>startoffset</I>,
|
|
<B> int </B><I>options</I>, int *<I>ovector</I>, int <I>ovecsize</I>,
|
|
<B> pcre_jit_stack *</B><I>jstack</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This function matches a compiled regular expression that has been successfully
|
|
studied with one of the JIT options against a given subject string, using a
|
|
matching algorithm that is similar to Perl's. It is a "fast path" interface to
|
|
JIT, and it bypasses some of the sanity checks that <B>pcre_exec()</B> applies.
|
|
It returns offsets to captured substrings. Its arguments are:
|
|
<P>
|
|
<BR> <I>code</I> Points to the compiled pattern
|
|
<BR> <I>extra</I> Points to an associated <B>pcre[16|32]_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> <I>jstack</I> Pointer to a JIT stack
|
|
<P>
|
|
The allowed options are:
|
|
<P>
|
|
<BR> PCRE_NOTBOL Subject string is not the beginning of a line
|
|
<BR> PCRE_NOTEOL Subject string is not the end of a line
|
|
<BR> PCRE_NOTEMPTY An empty string is not a valid match
|
|
<BR> PCRE_NOTEMPTY_ATSTART An empty string at the start of the subject
|
|
<BR> is not a valid match
|
|
<BR> PCRE_NO_UTF16_CHECK Do not check the subject for UTF-16
|
|
<BR> validity (only relevant if PCRE_UTF16
|
|
<BR> was set at compile time)
|
|
<BR> PCRE_NO_UTF32_CHECK Do not check the subject for UTF-32
|
|
<BR> validity (only relevant if PCRE_UTF32
|
|
<BR> was set at compile time)
|
|
<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
|
|
<BR> PCRE_PARTIAL_SOFT ) match if no full matches are found
|
|
<BR> PCRE_PARTIAL_HARD Return PCRE_ERROR_PARTIAL for a partial match
|
|
<BR> if that is found before a full match
|
|
<P>
|
|
However, the PCRE_NO_UTF[8|16|32]_CHECK options have no effect, as this check
|
|
is never applied. For details of partial matching, see the
|
|
|
|
<B>pcrepartial</B>
|
|
|
|
page. A <B>pcre_extra</B> structure contains the following fields:
|
|
<P>
|
|
<BR> <I>flags</I> Bits indicating which fields are set
|
|
<BR> <I>study_data</I> Opaque data from <B>pcre[16|32]_study()</B>
|
|
<BR> <I>match_limit</I> Limit on internal resource use
|
|
<BR> <I>match_limit_recursion</I> Limit on internal recursion depth
|
|
<BR> <I>callout_data</I> Opaque data passed back to callouts
|
|
<BR> <I>tables</I> Points to character tables or is NULL
|
|
<BR> <I>mark</I> For passing back a *MARK pointer
|
|
<BR> <I>executable_jit</I> Opaque data from JIT compilation
|
|
<P>
|
|
The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
|
|
PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_CALLOUT_DATA,
|
|
PCRE_EXTRA_TABLES, PCRE_EXTRA_MARK and PCRE_EXTRA_EXECUTABLE_JIT.
|
|
<P>
|
|
|
|
There is a complete description of the PCRE native API in the
|
|
|
|
<B>pcreapi</B>
|
|
|
|
page and a description of the JIT API in the
|
|
|
|
<B>pcrejit</B>
|
|
|
|
page.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:52 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|