blob: 0bccfc7d9e6e5ae55cd1d648f1255194d33f3aae [file] [log] [blame]
Elliott Hughes9bc971b2018-07-27 13:23:14 -07001.TH PCRE2_SET_NEWLINE 3 "26 May 2017" "PCRE2 10.30"
Janis Danisevskis112c9cc2016-03-31 13:35:25 +01002.SH NAME
3PCRE2 - Perl-compatible regular expressions (revised API)
4.SH SYNOPSIS
5.rs
6.sp
7.B #include <pcre2.h>
8.PP
9.nf
10.B int pcre2_set_newline(pcre2_compile_context *\fIccontext\fP,
11.B " uint32_t \fIvalue\fP);"
12.fi
13.
14.SH DESCRIPTION
15.rs
16.sp
17This function sets the newline convention within a compile context. This
18specifies which character(s) are recognized as newlines when compiling and
19matching patterns. The second argument must be one of:
20.sp
21 PCRE2_NEWLINE_CR Carriage return only
22 PCRE2_NEWLINE_LF Linefeed only
23 PCRE2_NEWLINE_CRLF CR followed by LF only
24 PCRE2_NEWLINE_ANYCRLF Any of the above
25 PCRE2_NEWLINE_ANY Any Unicode newline sequence
Elliott Hughes9bc971b2018-07-27 13:23:14 -070026 PCRE2_NEWLINE_NUL The NUL character (binary zero)
Janis Danisevskis112c9cc2016-03-31 13:35:25 +010027.sp
28The result is zero for success or PCRE2_ERROR_BADDATA if the second argument is
29invalid.
30.P
31There is a complete description of the PCRE2 native API in the
32.\" HREF
33\fBpcre2api\fP
34.\"
35page and a description of the POSIX API in the
36.\" HREF
37\fBpcre2posix\fP
38.\"
39page.