0 votes
in ReactJS by
What is Backreferencing in Regular expressions?

1 Answer

0 votes
by

Backreferencing is a feature of regular expressions, it is used to match new text that is same as matched earlier in the expression.

[0-9]+  match all the digits 9334

([0-9])\1+   match only 9334

\1 represent the match which was matched ([0-9]) 

...