Why are regular expressions with backlinks not regular expressions?

This article says:

A backlink, such as \ 1 or \ 2, matches the line matched by the previous expression in parentheses, and only this line: (cat | dog) \ 1 matches catcat and dogdog, but not catdog and dogcat. Regarding theoretical regular expressions with backlinks are not regular expressions.

Why? For what reason has \1become a "regular expression" no longer a "regular expression"?

+4
source share

No one has answered this question yet.

See related questions:

3892
,
3175
?
1215
?
950
?
644
: ?
310

Source: https://habr.com/ru/post/1660023/


All Articles