1PCRE2_MATCH_DATA_CREATE_FROML_iPbArTaTrEyRNF(u3n)ctPiCoRnEs2_MMaAnTuCaHl_DATA_CREATE_FROM_PATTERN(3)
2
3
4
6 PCRE2 - Perl-compatible regular expressions (revised API)
7
9
10 #include <pcre2.h>
11
12 pcre2_match_data *pcre2_match_data_create_from_pattern(
13 const pcre2_code *code, pcre2_general_context *gcontext);
14
16
17 This function creates a new match data block, which is used for holding
18 the result of a match. The first argument points to a compiled pattern.
19 The number of capturing parentheses within the pattern is used to com‐
20 pute the number of pairs of offsets that are required in the match data
21 block. These form the "output vector" (ovector) within the match data
22 block, and are used to identify the matched string and any captured
23 substrings.
24
25 The second argument points to a general context, for custom memory man‐
26 agement, or is NULL to use the same memory allocator as was used for
27 the compiled pattern. The result of the function is NULL if the memory
28 for the block could not be obtained.
29
30 There is a complete description of the PCRE2 native API in the pcre2api
31 page and a description of the POSIX API in the pcre2posix page.
32
33
34
35PCRE2 10.21 29 JulyPC2R0E125_MATCH_DATA_CREATE_FROM_PATTERN(3)