man-pages/man3/pcre2_set_newline.3.html
2021-03-31 01:06:50 +01:00

72 lines
2.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PCRE2_SET_NEWLINE</TITLE>
</HEAD><BODY>
<H1>PCRE2_SET_NEWLINE</H1>
Section: C Library Functions (3)<BR>Updated: 26 May 2017<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
PCRE2 - Perl-compatible regular expressions (revised API)
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>#include &lt;<A HREF="file:///usr/include/pcre2.h">pcre2.h</A>&gt;</B>
<P>
<PRE>
<B>int pcre2_set_newline(pcre2_compile_context *</B><I>ccontext</I>,
<B> uint32_t </B><I>value</I>);
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
This function sets the newline convention within a compile context. This
specifies which character(s) are recognized as newlines when compiling and
matching patterns. The second argument must be one of:
<P>
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_CR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Carriage&nbsp;return&nbsp;only
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_LF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linefeed&nbsp;only
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_CRLF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CR&nbsp;followed&nbsp;by&nbsp;LF&nbsp;only
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_ANYCRLF&nbsp;&nbsp;&nbsp;Any&nbsp;of&nbsp;the&nbsp;above
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_ANY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Any&nbsp;Unicode&nbsp;newline&nbsp;sequence
<BR>&nbsp;&nbsp;PCRE2_NEWLINE_NUL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;NUL&nbsp;character&nbsp;(binary&nbsp;zero)
<P>
The result is zero for success or PCRE2_ERROR_BADDATA if the second argument is
invalid.
<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">&nbsp;</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>