R

TestRegex

Match nth subpattern

\n

Usually referred to as a `backreference`, this will match a repeat of the text captured in a previous set of parentheses.

Examples

PCRE PYTHON JAVASCRIPT

Share & Embed

Use this snippet to display this token on your own site.

<!-- Embed Regex Token: \n -->
<code class="regex-token">\n</code> - Match nth subpattern
<small><a href="https://testregex.com/cheatsheet/match-nth-subpattern">See details</a></small>