84 lines
3.3 KiB
HTML
84 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE2_COMPILE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE2_COMPILE</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 23 March 2017<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>
|
|
|
|
PCRE2 - Perl-compatible regular expressions (revised API)
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<P>
|
|
<B>#include <<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<PRE>
|
|
<B>int pcre2_callout_enumerate(const pcre2_code *</B><I>code</I>,
|
|
<B> int (*</B><I>callback</I>)(pcre2_callout_enumerate_block *, void *),
|
|
<B> void *</B><I>callout_data</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This function scans a compiled regular expression and calls the <I>callback()</I>
|
|
function for each callout within the pattern. The yield of the function is zero
|
|
for success and non-zero otherwise. The arguments are:
|
|
<P>
|
|
<BR> <I>code</I> Points to the compiled pattern
|
|
<BR> <I>callback</I> The callback function
|
|
<BR> <I>callout_data</I> User data that is passed to the callback
|
|
<P>
|
|
The <I>callback()</I> function is passed a pointer to a data block containing
|
|
the following fields (not necessarily in this order):
|
|
<P>
|
|
<BR> uint32_t <I>version</I> Block version number
|
|
<BR> uint32_t <I>callout_number</I> Number for numbered callouts
|
|
<BR> PCRE2_SIZE <I>pattern_position</I> Offset to next item in pattern
|
|
<BR> PCRE2_SIZE <I>next_item_length</I> Length of next item in pattern
|
|
<BR> PCRE2_SIZE <I>callout_string_offset</I> Offset to string within pattern
|
|
<BR> PCRE2_SIZE <I>callout_string_length</I> Length of callout string
|
|
<BR> PCRE2_SPTR <I>callout_string</I> Points to callout string or is NULL
|
|
<P>
|
|
The second argument passed to the <B>callback()</B> function is the callout data
|
|
that was passed to <B>pcre2_callout_enumerate()</B>. The <B>callback()</B>
|
|
function must return zero for success. Any other value causes the pattern scan
|
|
to stop, with the value being passed back as the result of
|
|
<B>pcre2_callout_enumerate()</B>.
|
|
<P>
|
|
|
|
There is a complete description of the PCRE2 native API in the
|
|
|
|
<B>pcre2api</B>
|
|
|
|
page and a description of the POSIX API in the
|
|
|
|
<B>pcre2posix</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:49 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|