Skip to content

Error Codes and their meaning

JanZsch edited this page Nov 14, 2018 · 4 revisions

If you use the TryLoadRegexPattern method to load regex patterns, you obtain an IParseResult object. Besides the parse status (success/failure) and the position up to which the parsing succeeded, it contains an enumeration encoding the nature of the parsing error in case one occurred.
In the table below are listed all possible error values and their respective meaning:

RegexErrorType Meaning
IntegerIntervalSeparatorExpected ',' expected.
IntegerIntervalExpected Integer Interval expected, e.g. '{2,8}'.
SingleCharacterExpected Single character expected, e.g. 'F'.
CharacterRangeExpected Character range expected, e.g. 'f-z'.
IntegerExpected Integer expected, e.g. '-123'.
InvalidInput Invalid input.
UnexpectedEndOfStream The input stream ended unexpectedly.
InvalidRange Invalid character range. The first character has to come before the second one, e.g. 'a-g' and not 'F-a'.
InvalidInterval Invalid Interval. The lower bound has to be smaller than the upper bound.
CloseCharacterClassExpected ']' expected.
CharacterTypeExpressionExpected Single character, character range or '.' expected.
ClosePrecedenceExpected ')' expected.
UnionExpressionExpected '|' expected.

Previous
Next