Error codes returned by regular expressions functions.
compileCompilation of the regular expression failed.
optimizeOptimization of the regular expression failed.
replaceReplacement failed due to an ill-formed replacement string.
matchThe match process failed.
internalInternal error of the regular expression engine. Since 2.16
stray-backslash"\\" at end of pattern. Since 2.16
missing-control-char"\\c" at end of pattern. Since 2.16
unrecognized-escapeUnrecognized character follows "\\". Since 2.16
quantifiers-out-of-orderNumbers out of order in "{}" quantifier. Since 2.16
quantifier-too-bigNumber too big in "{}" quantifier. Since 2.16
unterminated-character-classMissing terminating "]" for character class. Since 2.16
invalid-escape-in-character-classInvalid escape sequence in character class. Since 2.16
range-out-of-orderRange out of order in character class. Since 2.16
nothing-to-repeatNothing to repeat. Since 2.16
unrecognized-characterUnrecognized character after "(?", "(?<" or "(?P". Since 2.16
posix-named-class-outside-classPOSIX named classes are supported only within a class. Since 2.16
unmatched-parenthesisMissing terminating ")" or ")" without opening "(". Since 2.16
inexistent-subpattern-referenceReference to non-existent subpattern. Since 2.16
unterminated-commentMissing terminating ")" after comment. Since 2.16
expression-too-largeRegular expression too large. Since 2.16
memory-errorFailed to get memory. Since 2.16
variable-length-lookbehindLookbehind assertion is not fixed length. Since 2.16
malformed-conditionMalformed number or name after "(?(". Since 2.16
too-many-conditional-branchesConditional group contains more than two branches. Since 2.16
assertion-expectedAssertion expected after "(?(". Since 2.16
unknown-posix-class-nameUnknown POSIX class name. Since 2.16
posix-collating-elements-not-supportedPOSIX collating elements are not supported. Since 2.16
hex-code-too-largeCharacter value in "\\x{...}" sequence is too large. Since 2.16
invalid-conditionInvalid condition "(?(0)". Since 2.16
single-byte-match-in-lookbehind\\C not allowed in lookbehind assertion. Since 2.16
infinite-loopRecursive call could loop indefinitely. Since 2.16
missing-subpattern-name-terminatorMissing terminator in subpattern name. Since 2.16
duplicate-subpattern-nameTwo named subpatterns have the same name. Since 2.16
malformed-propertyMalformed "\\P" or "\\p" sequence. Since 2.16
unknown-propertyUnknown property name after "\\P" or "\\p". Since 2.16
subpattern-name-too-longSubpattern name is too long (maximum 32 characters). Since 2.16
too-many-subpatternsToo many named subpatterns (maximum 10,000). Since 2.16
invalid-octal-valueOctal value is greater than "\\377". Since 2.16
too-many-branches-in-define"DEFINE" group contains more than one branch. Since 2.16
define-repetionRepeating a "DEFINE" group is not allowed. This error is never raised. Since: 2.16 Deprecated: 2.34
inconsistent-newline-optionsInconsistent newline options. Since 2.16
missing-back-reference"\\g" is not followed by a braced, angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16
invalid-relative-referencerelative reference must not be zero. Since: 2.34
backtracking-control-verb-argument-forbiddenthe backtracing control verb used does not allow an argument. Since: 2.34
unknown-backtracking-control-verbunknown backtracing control verb. Since: 2.34
number-too-bignumber is too big in escape sequence. Since: 2.34
missing-subpattern-nameMissing subpattern name. Since: 2.34
missing-digitMissing digit. Since 2.34
invalid-data-characterIn JavaScript compatibility mode, "[" is an invalid data character. Since: 2.34
extra-subpattern-namedifferent names for subpatterns of the same number are not allowed. Since: 2.34
backtracking-control-verb-argument-requiredthe backtracing control verb requires an argument. Since: 2.34
invalid-control-char"\\c" must be followed by an ASCII character. Since: 2.34
missing-name"\\k" is not followed by a braced, angle-bracketed, or quoted name. Since: 2.34
not-supported-in-class"\\N" is not supported in a class. Since: 2.34
too-many-forward-referencestoo many forward references. Since: 2.34
name-too-longthe name is too long in "(MARK)", "(PRUNE)", "(SKIP)", or "(THEN)". Since: 2.34
character-value-too-largethe character value in the \\u sequence is too large. Since: 2.34