1PCRE_STUDY(3) Library Functions Manual PCRE_STUDY(3)
2
3
4
6 PCRE - Perl-compatible regular expressions
7
9
10 #include <pcre.h>
11
12 pcre_extra *pcre_study(const pcre *code, int options,
13 const char **errptr);
14
15 pcre16_extra *pcre16_study(const pcre16 *code, int options,
16 const char **errptr);
17
18 pcre32_extra *pcre32_study(const pcre32 *code, int options,
19 const char **errptr);
20
22
23 This function studies a compiled pattern, to see if additional informa‐
24 tion can be extracted that might speed up matching. Its arguments are:
25
26 code A compiled regular expression
27 options Options for pcre[16|32]_study()
28 errptr Where to put an error message
29
30 If the function succeeds, it returns a value that can be passed to
31 pcre[16|32]_exec() or pcre[16|32]_dfa_exec() via their extra arguments.
32
33 If the function returns NULL, either it could not find any additional
34 information, or there was an error. You can tell the difference by
35 looking at the error value. It is NULL in first case.
36
37 The only option is PCRE_STUDY_JIT_COMPILE. It requests just-in-time
38 compilation if possible. If PCRE has been compiled without JIT support,
39 this option is ignored. See the pcrejit page for further details.
40
41 There is a complete description of the PCRE native API in the pcreapi
42 page and a description of the POSIX API in the pcreposix page.
43
44
45
46PCRE 8.30 24 June 2012 PCRE_STUDY(3)