new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / external / pcre2-10.32 / doc / pcre2_substring_number_from_name.3
1 .TH PCRE2_SUBSTRING_NUMBER_FROM_NAME 3 "21 October 2014" "PCRE2 10.00"
2 .SH NAME
3 PCRE2 - 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_substring_number_from_name(const pcre2_code *\fIcode\fP,
11 .B "  PCRE2_SPTR \fIname\fP);"
12 .fi
13 .
14 .SH DESCRIPTION
15 .rs
16 .sp
17 This convenience function finds the number of a named substring capturing
18 parenthesis in a compiled pattern, provided that it is a unique name. The
19 function arguments are:
20 .sp
21   \fIcode\fP    Compiled regular expression
22   \fIname\fP    Name whose number is required
23 .sp
24 The yield of the function is the number of the parenthesis if the name is
25 found, or PCRE2_ERROR_NOSUBSTRING if it is not found. When duplicate names are
26 allowed (PCRE2_DUPNAMES is set), if the name is not unique,
27 PCRE2_ERROR_NOUNIQUESUBSTRING is returned. You can obtain the list of numbers
28 with the same name by calling \fBpcre2_substring_nametable_scan()\fP.
29 .P
30 There is a complete description of the PCRE2 native API in the
31 .\" HREF
32 \fBpcre2api\fP
33 .\"
34 page and a description of the POSIX API in the
35 .\" HREF
36 \fBpcre2posix\fP
37 .\"
38 page.