# Regular Expression - Back reference

**URL:** https://community.mp3tag.de/t/regular-expression-back-reference/4993
**Category:** General Discussion
**Created:** [June 10, 2007, 3:30pm UTC](https://community.mp3tag.de/t/regular-expression-back-reference/4993 "2007-06-10T15:30:21Z")
**Posts on this page:** 4
**Page:** 1

<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: [June 10, 2007, 3:30pm UTC](https://community.mp3tag.de/t/regular-expression-back-reference/4993/1 "2007-06-10T15:30:21Z")

</div>

I would like to search for digits in a tagfield. If the digits are followed by characters or the digits are behind characters, I want to make a white space between the digits and the characters.

In RegxBuddy this works:

Match: (\d)(?=[a-zA-Z])|([a-zA-Z])(?=\d)  
Replace: \0

But If I try to enter this on Mp3Tag, the result is really strange... ![:unsure:](https://community.mp3tag.de/uploads/default/original/1X/cfaeba84fe6704387c5b34dfdd8172bd51b6f533.gif ":unsure:")  
How do I make a back reference in Mp3Tag?

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [June 10, 2007, 3:49pm UTC](https://community.mp3tag.de/t/regular-expression-back-reference/4993/2 "2007-06-10T15:49:26Z")

</div>

As written in the help $N is used to get the reference:  
Replace: $0

---

<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: [June 10, 2007, 4:40pm UTC](https://community.mp3tag.de/t/regular-expression-back-reference/4993/3 "2007-06-10T16:40:01Z")

</div>

Works great! Thanks for this important information. ![:w00t:](https://community.mp3tag.de/uploads/default/original/1X/cb01eca72fe9339ff6f3ec9f1e3c5fe002be0f0a.gif ":w00t:")

Is this $0 something special for Mp3Tag?  
According to my Regex-documentation ![:book:](https://community.mp3tag.de/uploads/default/original/1X/0036d5b68f6226c53f6c68abfd0a7b8096fd4505.gif ":book:") , the $n is a "reference capture" and the \0 a "numbered backreference" - not exactly the same.

Which regex-dialect is used by Mp3Tag?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [June 10, 2007, 5:25pm UTC](https://community.mp3tag.de/t/regular-expression-back-reference/4993/4 "2007-06-10T17:25:33Z")

</div>

> [@LyricsLover](#):
>
> Is this $0 something special for Mp3Tag?  
> According to my Regex-documentation ![:book:](https://community.mp3tag.de/uploads/default/original/1X/0036d5b68f6226c53f6c68abfd0a7b8096fd4505.gif ":book:") , the $n is a "reference capture" and the \0 a "numbered backreference" - not exactly the same.

\N (e.g. \1) can be used to reference the Nth sub-expression.

> [@](#):
>
> Which regex-dialect is used by Mp3Tag?

It's Perl syntax.
