Just like there's more to our square-bracketed character classes, there's more to the use of parenthesis in regular expressions, too. Parenthesis work as capturing groups, which capture the match that the regular expression has made. Later, we can reference that match with a backreference, ensuring that the expression captured with the backreference is identical to the match from the capturing group. This allows us more detailed and accurate matches when we create our expressions.
Get the lesson files here!: