1PCRE2_CODE_COPY(3) Library Functions Manual PCRE2_CODE_COPY(3)
2
3
4
6 PCRE2 - Perl-compatible regular expressions (revised API)
7
9
10 #include <pcre2.h>
11
12 pcre2_code *pcre2_code_copy(const pcre2_code *code);
13
15
16 This function makes a copy of the memory used for a compiled pattern,
17 excluding any memory used by the JIT compiler. Without a subsequent
18 call to pcre2_jit_compile(), the copy can be used only for non-JIT
19 matching. The pointer to the character tables is copied, not the tables
20 themselves (see pcre2_code_copy_with_tables()). The yield of the func‐
21 tion is NULL if code is NULL or if sufficient memory cannot be
22 obtained.
23
24 There is a complete description of the PCRE2 native API in the pcre2api
25 page and a description of the POSIX API in the pcre2posix page.
26
27
28
29PCRE2 10.23 22 November 2016 PCRE2_CODE_COPY(3)