|PCRE_COMPILE(3)||Library Functions Manual||PCRE_COMPILE(3)|
pcre *pcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); pcre16 *pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); pcre32 *pcre32_compile(PCRE_SPTR32 pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr);
pattern A zero-terminated string containing the regular expression to be compiled options Zero or more option bits errptr Where to put an error message erroffset Offset in pattern where error was found tableptr Pointer to character tables, or NULL to use the built-in default
The option bits are:
PCRE must be built with UTF support in order to use PCRE_UTF8/16/32 and PCRE_NO_UTF8/16/32_CHECK, and with UCP support if PCRE_UCP is used.
The yield of the function is a pointer to a private data structure that contains the compiled pattern, or NULL if an error was detected. Note that compiling regular expressions with one version of PCRE for use with a different version is not guaranteed to work and may cause crashes.
There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page.
|01 October 2013||PCRE 8.34|