Описание тега backreference
Back references are regular expression constructs that make use of capturing in regex to perform replacement based on parts of the matched string captured during a match sequence in the regexp pattern.
Back references and capturing-group s are regular expression constructs that makes use of capturing in regex to perform matching and replacement that remembers parts of the matched string during a match sequence in the regexp pattern.
The back-referencing constructs present in all engines are \1
to \9
, where \1
back-reference references the first ( )
capturing group.
Read more: