| Value | Meaning |
|---|---|
| Compile0 | Compilation of the regular expression failed. |
| Optimize1 | Optimization of the regular expression failed. |
| Replace2 | Replacement failed due to an ill-formed replacement string. |
| Match3 | The match process failed. |
| Internal4 | Internal error of the regular expression engine. Since 2.16 |
| StrayBackslash101 | "\\" at end of pattern. Since 2.16 |
| MissingControlChar102 | "\\c" at end of pattern. Since 2.16 |
| UnrecognizedEscape103 | Unrecognized character follows "\\". Since 2.16 |
| QuantifiersOutOfOrder104 | Numbers out of order in "{}" quantifier. Since 2.16 |
| QuantifierTooBig105 | Number too big in "{}" quantifier. Since 2.16 |
| UnterminatedCharacterClass106 | Missing terminating "]" for character class. Since 2.16 |
| InvalidEscapeInCharacterClass107 | Invalid escape sequence in character class. Since 2.16 |
| RangeOutOfOrder108 | Range out of order in character class. Since 2.16 |
| NothingToRepeat109 | Nothing to repeat. Since 2.16 |
| UnrecognizedCharacter112 | Unrecognized character after "(?", "(?<" or "(?P". Since 2.16 |
| PosixNamedClassOutsideClass113 | POSIX named classes are supported only within a class. Since 2.16 |
| UnmatchedParenthesis114 | Missing terminating ")" or ")" without opening "(". Since 2.16 |
| InexistentSubpatternReference115 | Reference to non-existent subpattern. Since 2.16 |
| UnterminatedComment118 | Missing terminating ")" after comment. Since 2.16 |
| ExpressionTooLarge120 | Regular expression too large. Since 2.16 |
| MemoryError121 | Failed to get memory. Since 2.16 |
| VariableLengthLookbehind125 | Lookbehind assertion is not fixed length. Since 2.16 |
| MalformedCondition126 | Malformed number or name after "(?(". Since 2.16 |
| TooManyConditionalBranches127 | Conditional group contains more than two branches. Since 2.16 |
| AssertionExpected128 | Assertion expected after "(?(". Since 2.16 |
| UnknownPosixClassName130 | Unknown POSIX class name. Since 2.16 |
| PosixCollatingElementsNotSupported131 | POSIX collating elements are not supported. Since 2.16 |
| HexCodeTooLarge134 | Character value in "\\x{...}" sequence is too large. Since 2.16 |
| InvalidCondition135 | Invalid condition "(?(0)". Since 2.16 |
| SingleByteMatchInLookbehind136 | \\C not allowed in lookbehind assertion. Since 2.16 |
| InfiniteLoop140 | Recursive call could loop indefinitely. Since 2.16 |
| MissingSubpatternNameTerminator142 | Missing terminator in subpattern name. Since 2.16 |
| DuplicateSubpatternName143 | Two named subpatterns have the same name. Since 2.16 |
| MalformedProperty146 | Malformed "\\P" or "\\p" sequence. Since 2.16 |
| UnknownProperty147 | Unknown property name after "\\P" or "\\p". Since 2.16 |
| SubpatternNameTooLong148 | Subpattern name is too long (maximum 32 characters). Since 2.16 |
| TooManySubpatterns149 | Too many named subpatterns (maximum 10,000). Since 2.16 |
| InvalidOctalValue151 | Octal value is greater than "\\377". Since 2.16 |
| TooManyBranchesInDefine154 | "DEFINE" group contains more than one branch. Since 2.16 |
| DefineRepetion155 | Repeating a "DEFINE" group is not allowed. This error is never raised. Since: 2.16 Deprecated: 2.34 |
| InconsistentNewlineOptions156 | Inconsistent newline options. Since 2.16 |
| MissingBackReference157 | "\\g" is not followed by a braced, angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 |
| InvalidRelativeReference158 | relative reference must not be zero. Since: 2.34 |
| BacktrackingControlVerbArgumentForbidden159 | the backtracing control verb used does not allow an argument. Since: 2.34 |
| UnknownBacktrackingControlVerb160 | unknown backtracing control verb. Since: 2.34 |
| NumberTooBig161 | number is too big in escape sequence. Since: 2.34 |
| MissingSubpatternName162 | Missing subpattern name. Since: 2.34 |
| MissingDigit163 | Missing digit. Since 2.34 |
| InvalidDataCharacter164 | In JavaScript compatibility mode, "[" is an invalid data character. Since: 2.34 |
| ExtraSubpatternName165 | different names for subpatterns of the same number are not allowed. Since: 2.34 |
| BacktrackingControlVerbArgumentRequired166 | the backtracing control verb requires an argument. Since: 2.34 |
| InvalidControlChar168 | "\\c" must be followed by an ASCII character. Since: 2.34 |
| MissingName169 | "\\k" is not followed by a braced, angle-bracketed, or quoted name. Since: 2.34 |
| NotSupportedInClass171 | "\\N" is not supported in a class. Since: 2.34 |
| TooManyForwardReferences172 | too many forward references. Since: 2.34 |
| NameTooLong175 | the name is too long in "(*MARK)", "(*PRUNE)", "(*SKIP)", or "(*THEN)". Since: 2.34 |
| CharacterValueTooLarge176 | the character value in the \\u sequence is too large. Since: 2.34 |
Error codes returned by regular expressions functions.