JCL Help:TJclRegEx.ErrorMessage

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Represents an error message generated when compiling a regular expression.


Pascal

 public property ErrorMessage: string;


Description

ErrorMessage is a read-only String property that represents an error message generated when compiling a regular expression.
ErrorMessage represents the inital error found in the semantics or syntax of the regular expression passed as an argument to the Compile method.
ErrorMessage may contain the following:

Value Meaning
0 no error
1 \ at end of pattern
2 \c at end of pattern
3 unrecognized character follows \
4 numbers out of order in {} quantifier
5 number too big in {} quantifier
6 missing terminating ] for character class
7 invalid escape sequence in character class
8 range out of order in character class
9 nothing to repeat
10 operand of unlimited repeat could match the empty string
11 internal error: unexpected repeat
12 unrecognized character after (?
13 POSIX named classes are supported only within a class
14 missing )
15 reference to non-existent subpattern
16 erroffset passed as NULL
17 Anonymous option bit(s) set
18 missing ) after comment
19 parentheses nested too deeply
20 regular expression too large
21 failed to get memory
22 unmatched parentheses
23 internal error: code overflow
24 unrecognized character after (?<
25 lookbehind assertion is not fixed length
26 malformed number or name after (?(
27 conditional group contains more than two branches
28 assertion expected after (?(
29 (?R or (?digits must be followed by )
30 Anonymous POSIX class name
31 POSIX collating elements are not supported
32 this version of PCRE is not compiled with PCRE_UTF8 support
33 spare error
34 character value in x{...} sequence is too large
35 invalid condition (?(0)
36 \C not allowed in lookbehind assertion
37 PCRE does not support \L, \l, \N, \U, or \u
38 number after (?C is > 255
39 closing ) for (?C expected
40 recursive call could loop indefinitely
41 unrecognized character after (?P
42 syntax error after (?P
43 two named subpatterns have the same name
44 invalid UTF-8 string
45 support for \P, \p, and \X has not been compiled
46 malformed \P or \p sequence
47 Anonymous property name after \P or \p
48 subpattern name is too long (maximum 32 characters)
49 too many named subpatterns (maximum 10,000)
50 repeated subpattern is too long
51 octal value is greater than \377 (not in UTF-8 mode)


Use ErrorOffset to locate the offset into the regular expression string where the error is located.


See Also

ErrorOffset Compile


About

Notes

ErrorMessage and ErrorOffset are not related to EPCREError exception messages generated at run-time by the PCRE library.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page