backreference

1 topic · 1 source

Technology› Programming

Perl

A substring captured by a subpattern within unadorned parentheses in a "regex". Backslashed decimal numbers (, , etc.) later in the same pattern refer back to the corresponding subpattern in the current match. Outside the pattern, the numbered variables ($1, $2, etc.) continue to refer to these same values, as long as the pattern was the last successful match of the current dynamic scope.

Cite this definition

APA
MLA
Chicago