1PCRE2_PATTERN_CONVERT(3)   Library Functions Manual   PCRE2_PATTERN_CONVERT(3)
2
3
4

NAME

6       PCRE2 - Perl-compatible regular expressions (revised API)
7

SYNOPSIS

9
10       #include <pcre2.h>
11
12       int pcre2_pattern_convert(PCRE2_SPTR pattern, PCRE2_SIZE length,
13         uint32_t options, PCRE2_UCHAR **buffer,
14         PCRE2_SIZE *blength, pcre2_convert_context *cvcontext);
15

DESCRIPTION

17
18       This  function  is  part  of  an experimental set of pattern conversion
19       functions.  It converts a foreign pattern (for example, a glob) into  a
20       PCRE2 regular expression pattern. Its arguments are:
21
22         pattern     The foreign pattern
23         length      The length of the input pattern or PCRE2_ZERO_TERMINATED
24         options     Option bits
25         buffer      Pointer to pointer to output buffer, or NULL
26         blength     Pointer to output length field
27         cvcontext   Pointer to a convert context or NULL
28
29       The length of the converted pattern (excluding the terminating zero) is
30       returned via blength. If buffer is NULL, the function just returns  the
31       output  length.  If  buffer  points  to  a NULL pointer, heap memory is
32       obtained for the converted pattern, using the allocator in the  context
33       if  present  (or  else malloc()), and the field pointed to by buffer is
34       updated. If buffer points to a non-NULL field, that  must  point  to  a
35       buffer  whose size is in the variable pointed to by blength. This value
36       is updated.
37
38       The option bits are:
39
40         PCRE2_CONVERT_UTF                     Input is UTF
41         PCRE2_CONVERT_NO_UTF_CHECK            Do not check UTF validity
42         PCRE2_CONVERT_POSIX_BASIC             Convert POSIX basic pattern
43         PCRE2_CONVERT_POSIX_EXTENDED          Convert POSIX extended pattern
44         PCRE2_CONVERT_GLOB                    ) Convert
45         PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR  )   various types
46         PCRE2_CONVERT_GLOB_NO_STARSTAR        )     of glob
47
48       The return value from pcre2_pattern_convert() is zero on success  or  a
49       non-zero PCRE2 error code.
50
51       The pattern conversion functions are described in the pcre2convert doc‐
52       umentation.
53
54
55
56PCRE2 10.30                      11 July 2017         PCRE2_PATTERN_CONVERT(3)
Impressum