Result = RegularExpressionNamedGroupPosition(#RegularExpression, GroupName$)
Returns the position (within the current matching string) of the specified named group after a call to NextRegularExpressionMatch().


#RegularExpression The regular expression to use. ExamineRegularExpression() and NextRegularExpressionMatch() must have been called on this regular expression.
GroupName$ The name of the group to extract. The group name is case sensitive.

Return value

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.


Groups in a regular expression are defined by surrounding a sub-expression with braces "(" and ")". Groups can either accessed by index using functions like RegularExpressionGroupPosition() or they can be assigned a name using the "(?<name>)" syntax as shown in the example for the RegularExpressionNamedGroup() function.

See Also

ExamineRegularExpression(), NextRegularExpressionMatch(), RegularExpressionNamedGroup(), RegularExpressionNamedGroupLength(), RegularExpressionGroupPosition()

Supported OS


<- RegularExpressionNamedGroupLength() - RegularExpression Index - ReplaceRegularExpression() ->