Updated and Reviewed March 2011
Value |
Description |
-2 |
(Internal error) ovector was NULL and ovecsize was not zero. |
-3 |
An unrecognized bit was set in the options argument. |
-4 |
PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch the case when it is passed a junk pointer and to detect when a pattern that was compiled in an environment of one endianness is run in an environment with the other endianness. This is the error that PCRE gives when the magic number is not present. |
-5 |
While running the pattern match, an unknown item was encountered in the compiled pattern. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. |
-6 |
If a pattern contains back references, but the ovector that is passed to pcre_exec() is not big enough to remember the referenced substrings, PCRE gets a block of memory at the start of matching to use for this purpose. If the call via pcre_malloc() fails, this error is given. The memory is automatically freed at the end of matching. |
-7 |
This error is used by the pcre_copy_substring(), pcre_get_substring(), and pcre_get_substring_list() functions. It is never returned by pcre_exec(). |
-8 |
The backtracking limit, as specified by the match_limit field in a pcre_extra structure (or defaulted) was reached. See the description above. |
-9 |
This error is never generated by pcre_exec() itself. It is provided for use by callout functions that want to yield a distinctive error code. See the pcrecallout documentation for details. |
-10 |
A string that contains an invalid UTF-8 byte sequence was passed as a subject. |
-11 |
The UTF-8 byte sequence that was passed as a subject was valid, but the value of startoffset did not point to the beginning of a UTF-8 character. |
-12 |
The subject string did not match, but it did match partially. See the pcrepartial documentation for details of partial matching. |
-13 |
The PCRE_PARTIAL option was used with a compiled pattern containing items that are not supported for partial matching. See the pcrepartial documentation for details of partial matching. |
-14 |
An unexpected internal error has occurred. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. |
-15 |
This error is given if the value of the ovecsize argument is negative. |
-21 |
The internal recursion depth limit has been exceeded. This has been set internally to 2500 for Windows and 10000 for UNIX, which in theory is about as much as we could expect to handle before running the risk of a stack overflow and segmentation fault. If you are hitting this limit, either your pattern/subject combination is enormously complex, or, more likely, your pattern is inefficiently designed to cause more recursion that is necessary. |
-23 |
An invalid combination of PCRE_NEWLINE_xxx options was given. |