R

TestRegex

Contents in capture group 1

\g<1>

This will return a string with the contents from the first capture group. The number, in this case 1, can be any number as long as it corresponds to a valid capture group.

Examples

PCRE PYTHON

Share & Embed

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

<!-- Embed Regex Token: \g<1> -->
<code class="regex-token">\g<1></code> - Contents in capture group 1
<small><a href="https://testregex.com/cheatsheet/contents-in-capture-group-1-slash-g1">See details</a></small>