...

/

Working with Backreferences

Working with Backreferences

Learn how to use back references for processing inputs having more than one match.

We'll cover the following...

Backreferences

Backreferences allow us to reuse previously matched sub-strings within a regular expression pattern. A backreference matches the same sub-string that a capture group already matches.

Using \\n for backreferencing

To create a backreference, we use the following syntax:

\\n
...