> On 26 Feb 2025, at 11:43, Niu Danny via austin-group-l at The Open Group > <austin-group-l@opengroup.org> wrote: > > Are we back online now? Can the terminology of > ''subpattern'' and ''subexpression'' be clarified? > Do they mean the parenthesized portions or do they > refer to any arbitrary substring spelled by the regex?
It is called marked subexpression, or capturing group, on these pages: https://en.wikipedia.org/wiki/Regular_expression https://www.regular-expressions.info/refflavors.html I have found no formal definition of a subexpression in computer contexts, but following metamathematics for formulas, it is a regular expression that is a contiguous part of another regular expression. A formal definition of regular expression is done in the Waite–Goos book, where parentheses are used for grouping without matching: A source of ambiguity in your usage is that you use them for matching alone.