RegularExpressionGroupPosition()
语法
Result = RegularExpressionGroupPosition(#RegularExpression, Group)概要
Returns the position (within the current matching string) of the specified group after a call to NextRegularExpressionMatch().
参数
#RegularExpression The regular expression to use. ExamineRegularExpression() and NextRegularExpressionMatch() must have been called on this regular expression. Group The index of the group. The first group has index 1.
返回值
Returns the character position of the group within the matching string (not within the orginal input string!). The first character of the match has position 1.
Remarks
Groups in a regular expression are defined by surrounding a sub-expression with braces "(" and ")". The groups are numbered as they appear in the regular expression from left to right. The first group has index 1. The CountRegularExpressionGroups() function can be used to find out the number of groups in a regular expression.
As an alternative, the RegularExpressionNamedGroupPosition() function can be used.
参阅
ExamineRegularExpression(), NextRegularExpressionMatch(), RegularExpressionGroup(), RegularExpressionGroupLength(), RegularExpressionNamedGroupPosition()
已支持操作系统
所有