EControl Syntax Editor SDK
TecRegExpr.SubExprMatchCount Property

Number of subexpressions.

property SubExprMatchCount: integer;

If preceded matching procedure is successful value will be equal number of subexpressions detected in text during mitching, otherwise it will be equal -1. Subexpression with index 0 is whole matching string, SubExprMatchCount can not be equal to zero. 

To get subexpression string use properties MatchPos and MatchLen


Subexpressions are used in Substitute function.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!