RegularExpressionGroupLength()

Syntax

Result = RegularExpressionGroupLength(#RegularExpression, Group)
Description
Returns the length of the specified regular expression group after a call to NextRegularExpressionMatch().

Parameters

#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.

Return value

Returns the character position of the group.

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 RegularExpressionNamedGroupLength() function can be used.

See Also

ExamineRegularExpression(), NextRegularExpressionMatch(), RegularExpressionGroup(), RegularExpressionGroupPosition(), RegularExpressionNamedGroupLength()

Supported OS

All

<- RegularExpressionGroup() - RegularExpression Index - RegularExpressionGroupPosition() ->