If we group the regular expressions with more than one character and place it inside parentheses, it becomes a sub-expression. This sub-expression is matched and the output of the match is remembered and can be recalled if you find the same pattern occurrence again during the subsequent match operation.
We can recall the remembered pattern with \ followed by a single digit. We can have a maximum of nine different remembered patterns. Each occurrence of ( starts a new pattern of a sub-expression. This process of recalling remembered patterns is called the backreferencing of sub-expressions.
Sub-expressions are represented by enclosing a regex between parentheses: → \(regex\)
A backreference ...