上QQ阅读APP看书,第一时间看更新
Grouping using parentheses
This is also known as creating sub-expressions. Single-letter repetition can be easily controlled with unary operators or interval expressions, however, if we need to match the repetition of a word or group of characters, then we have to group that regular expression together inside parentheses. It is quite similar to the grouping of expressions as done in math. Parentheses or grouping is used for two operations, that is, concatenation and back-referencing.