Group.Success Group.Success Group.Success Group.Success Property

定义

获取一个值,该值指示匹配是否成功。Gets a value indicating whether the match is successful.

public:
 property bool Success { bool get(); };
public bool Success { get; }
member this.Success : bool
Public ReadOnly Property Success As Boolean

属性值

如果匹配成功,则为 true;否则为 falsetrue if the match is successful; otherwise, false.

注解

如果此组至少捕获了一个子字符串, 则属性为true。SuccessThe Success property is true if at least one substring was captured by this group. 它等效于布尔表达式 (> 0)。It is equivalent to the Boolean expression (Group.Captures.Count > 0).

适用于