# Would like to know what $1 does?

**URL:** https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294
**Category:** Support
**Created:** [January 27, 2025, 6:03pm UTC](https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294 "2025-01-27T18:03:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gat3pm](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/df705f/32.png) [@Gat3pm](https://community.mp3tag.de/u/Gat3pm)
#### Post date: [January 27, 2025, 6:03pm UTC](https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294/1 "2025-01-27T18:03:45Z")

</div>

$regexp(%comment%,( ._): (._),$1)

Got this expression from someone helping me and applied it to strings like the one below. What does the $1 do? Is there a page that lists $x and explains what it does?

Money Down The Drain: Blah, Blah, Blah (2001)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 27, 2025, 6:33pm UTC](https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294/2 "2025-01-27T18:33:53Z")

</div>

> [@Gat3pm](#):
>
> Is there a page that lists $x and explains what it does?

Yes:

> **[Regular Expressions – Mp3tag Documentation](https://docs.mp3tag.de/regex/)**
>
> Documentation on support for regular expressions in Mp3tag. Mp3tag is the universal Tag Editor.

and there is also a page that gives hints how to format strings like

> [@Gat3pm](#):
>
> $regexp(%comment%,( ._): (._),$1)

so that they come out like  
`$regexp(%comment%,(.*): (.*),$1)`

> [@Hints for asking Support Requests](https://community.mp3tag.de/t/hints-for-asking-support-requests/56190):
>
> If you need support using Mp3tag, you can help the community members that are about to support you in finding a solution or workaround to your problem, by following these simple guidelines. Be descriptive, also in what you’ve already tried Please give a short explanation what’s not working as expected or what you’re trying to achieve. It’s best to know any details about the problem at hand and especially, what steps you’ve already tried to solve it by yourself. Helpful information also includ…

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [January 27, 2025, 8:15pm UTC](https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294/3 "2025-01-27T20:15:34Z")

</div>

> [@Gat3pm](#):
>
> What does the $1 do?

$1 is a [substitution](https://www.tutorialsteacher.com/regex/substitution).  
From the linked tutorial:

> Substitution in regex refers to the process of replacing matches of a pattern with a specified replacement string. It allows you to transform or modify text based on the matches found in the input string...  
> You can replace string by taking reference of the matched group using `$`. Use the respective matched group number e.g. `$1` for first group, `$2` for second and so on.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 26, 2025, 8:16pm UTC](https://community.mp3tag.de/t/would-like-to-know-what-1-does/67294/4 "2025-02-26T20:16:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
