89 lines
3.8 KiB
HTML
89 lines
3.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PCRE2_PATTERN_CONVERT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PCRE2_PATTERN_CONVERT</H1>
|
|
Section: C Library Functions (3)<BR>Updated: 11 July 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_pattern_convert(PCRE2_SPTR </B><I>pattern</I>, PCRE2_SIZE <I>length</I>,
|
|
<B> uint32_t </B><I>options</I>, PCRE2_UCHAR **<I>buffer</I>,
|
|
<B> PCRE2_SIZE *</B><I>blength</I>, pcre2_convert_context *<I>cvcontext</I>);
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
This function is part of an experimental set of pattern conversion functions.
|
|
It converts a foreign pattern (for example, a glob) into a PCRE2 regular
|
|
expression pattern. Its arguments are:
|
|
<P>
|
|
<BR> <I>pattern</I> The foreign pattern
|
|
<BR> <I>length</I> The length of the input pattern or PCRE2_ZERO_TERMINATED
|
|
<BR> <I>options</I> Option bits
|
|
<BR> <I>buffer</I> Pointer to pointer to output buffer, or NULL
|
|
<BR> <I>blength</I> Pointer to output length field
|
|
<BR> <I>cvcontext</I> Pointer to a convert context or NULL
|
|
<P>
|
|
The length of the converted pattern (excluding the terminating zero) is
|
|
returned via <I>blength</I>. If <I>buffer</I> is NULL, the function just returns
|
|
the output length. If <I>buffer</I> points to a NULL pointer, heap memory is
|
|
obtained for the converted pattern, using the allocator in the context if
|
|
present (or else <B>malloc()</B>), and the field pointed to by <I>buffer</I> is
|
|
updated. If <I>buffer</I> points to a non-NULL field, that must point to a
|
|
buffer whose size is in the variable pointed to by <I>blength</I>. This value is
|
|
updated.
|
|
<P>
|
|
|
|
The option bits are:
|
|
<P>
|
|
<BR> PCRE2_CONVERT_UTF Input is UTF
|
|
<BR> PCRE2_CONVERT_NO_UTF_CHECK Do not check UTF validity
|
|
<BR> PCRE2_CONVERT_POSIX_BASIC Convert POSIX basic pattern
|
|
<BR> PCRE2_CONVERT_POSIX_EXTENDED Convert POSIX extended pattern
|
|
<BR> PCRE2_CONVERT_GLOB ) Convert
|
|
<BR> PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR ) various types
|
|
<BR> PCRE2_CONVERT_GLOB_NO_STARSTAR ) of glob
|
|
<P>
|
|
The return value from <B>pcre2_pattern_convert()</B> is zero on success or a
|
|
non-zero PCRE2 error code.
|
|
<P>
|
|
|
|
The pattern conversion functions are described in the
|
|
|
|
<B>pcre2convert</B>
|
|
|
|
documentation.
|
|
<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:50 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|