RegexParseError 枚举

定义

指定当正则表达式包含分析错误时引发 RegexParseException 的详细基本原因。Specifies the detailed underlying reason why a RegexParseException is thrown when a regular expression contains a parsing error.

public enum class RegexParseError
public enum RegexParseError
type RegexParseError = 
Public Enum RegexParseError
继承
RegexParseError

字段

AlternationHasComment 17

正则表达式中的某个替换构造包含注释。An alternation construct in a regular expression contains a comment.

AlternationHasMalformedCondition 2

正则表达式中的某个替换包含格式不正确的条件。An alternation in a regular expression has a malformed condition.

AlternationHasMalformedReference 18

正则表达式中的某个替换构造包含格式不正确的引用。An alternation construct in a regular expression contains a malformed reference.

AlternationHasNamedCapture 16

正则表达式中的某个替换构造使用已命名的捕获。An alternation construct in a regular expression uses a named capture.

AlternationHasTooManyConditions 1

正则表达式中的某个替换具有过多条件。An alternation in a regular expression has too many conditions.

AlternationHasUndefinedReference 19

正则表达式中的某个替换构造包含未定义的引用。An alternation construct in a regular expression contains an undefined reference.

CaptureGroupNameInvalid 20

正则表达式中某个捕获的组的组名无效。The group name of a captured group in a regular expression is invalid.

CaptureGroupOfZero 21

正则表达式定义了一个名为零的带编号的子表达式。A regular expression defines a numbered subexpression named zero.

ExclusionGroupNotLast 23

某个字符类位于一个具有排除组的正则表达式中,该组不是该字符类的最后一部分。A character class in a regular expression with an exclusion group is not the last part of the character class.

InsufficientClosingParentheses 26

某个正则表达式有一个非转义的左括号,或缺少右括号。A regular expression has a non-escaped left parenthesis, or misses a closing right parenthesis.

InsufficientOpeningParentheses 30

某个正则表达式有一个非转义的右括号,或缺少左括号。A regular expression has a non-escaped right parenthesis, or misses an opening left parenthesis.

InsufficientOrInvalidHexDigits 8

正则表达式中的十六进制转义序列位数不足,或包含无效位。A hexadecimal escape sequence in a regular expression does not have enough digits, or contains invalid digits.

InvalidGroupingConstruct 15

正则表达式中的分组构造无效或格式不正确。A grouping construct in a regular expression is invalid or malformed.

InvalidUnicodePropertyEscape 3

正则表达式中的 Unicode 属性转义无效或未知。A Unicode property escape in a regular expression is invalid or unknown.

MalformedNamedReference 12

正则表达式中的命名引用的格式不正确。A named reference in a regular expression is malformed.

MalformedUnicodePropertyEscape 4

Unicode 属性转义格式不正确。A Unicode property escape is malformed.

MissingControlCharacter 7

正则表达式中缺少某个控制字符。A control character in a regular expression is missing.

NestedQuantifiersNotParenthesized 28

正则表达式中另一个限定符上的重复限定符未使用括号归组。Repeated quantifiers on another quantifier inside a regular expression are not grouped in parentheses.

QuantifierAfterNothing 29

正则表达式中的限定符位于某个无法量化任何内容的位置,例如,在正则表达式的开头或某个组中。A quantifier in a regular expression is in a position where it cannot quantify anything, like at the beginning of a regular expression or in a group.

QuantifierOrCaptureGroupOutOfRange 9

正则表达式中某个捕获的组或限定符不在范围内,即大于 MaxValueA captured group or a quantifier in a regular expression is not within range, that is, it is larger than MaxValue.

ReversedCharacterRange 24

正则表达式中的某个字符类包含逆向字符范围,如 z-a 而不是 a-z。A character class in a regular expression contains an inverse character range, like z-a instead of a-z.

ReversedQuantifierRange 27

正则表达式中的某个限定符范围是逆向的,如A quantifier range in a regular expression is inverse, like {10,1} 而不是instead of (1,10}.

ShorthandClassInCharacterRange 25

正则表达式中的某个字符类包含一个字符类中不允许的简略类。A character-class in a regular expression contains a short-hand class that is not allowed inside a character class.

UndefinedNamedReference 10

正则表达式中使用的某个命名引用未进行定义。A used named reference in a regular expression is not defined.

UndefinedNumberedReference 11

正则表达式中使用的某个带编号的引用未进行定义。A used numbered reference in a regular expression is not defined.

UnescapedEndingBackslash 13

正则表达式以非转义结尾反斜杠结尾。A regular expression ends with a non-escaped ending backslash.

Unknown 0

未知的正则表达式分析错误。An unknown regular expression parse error.

UnrecognizedControlCharacter 6

正则表达式中的某个控制字符无法识别。A control character in a regular expression is not recognized.

UnrecognizedEscape 5

正则表达式中的某个转义字符或序列无效。An escape character or sequence in a regular expression is invalid.

UnrecognizedUnicodeProperty 31

正则表达式中的某个 unicode 属性无法识别或无效。A unicode property in a regular expression is not recognized, or invalid.

UnterminatedBracket 22

正则表达式有一个非转义的左方括号,或缺少右方括号。A regular expression has a non-escaped left square bracket, or misses a closing right square bracket.

UnterminatedComment 14

正则表达式中的某个注释未终止。A comment in a regular expression is not terminated.

注解

此信息通过提供 ErrorThis information is made available through Error.

适用于