# Putting Brackets around the year in the filename

**URL:** https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332
**Category:** Support
**Created:** [August 7, 2025, 1:45am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332 "2025-08-07T01:45:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [August 7, 2025, 1:45am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/1 "2025-08-07T01:45:18Z")

</div>

I’m trying to tidy my filenames to make them more uniform. Most have the year in them , which always starts with ‘19’ and always has four digits. I’d like to identify the year and put brackets around the year where it appears. Where the year already has brackets around it , this could of course be left as is.

For example

Roger Wolfe Kahn Orch - Your A Real Sweetheart 1928  
Roger Wolfe Kahn Orch, Miff Mole On Trombone  
Roseland Dance Orchestra - I've Got A Song For Sale 1923  
Roseland Dance Orchestra - Sitting In A Corner 1924  
Rudolph Valentino - El Relicario 1923 Brunswick  
Rudolph Valentino - Kashmiri Song 1923 Brunswick  
Ruth Etting - Ain't Misbehavin'  
Ruth Etting - At Sundown (1927)  
Ruth Etting - Because My Baby Don't Mean Maybe (1928)  
Ruth Etting - Exactly Like You (1930)  
Ruth Etting - Goodnight My Love  
Ruth Etting - I'm Nobody's Baby  
Ruth Etting - It All Depends On You 1929  
Ruth Etting - Lonesome And Sorry 1926 (Columbia 644)

Would become

Roger Wolfe Kahn Orch - Your A Real Sweetheart (1928)  
Roger Wolfe Kahn Orch, Miff Mole On Trombone  
Roseland Dance Orchestra - I've Got A Song For Sale (1923)  
Roseland Dance Orchestra - Sitting In A Corner (1924)  
Rudolph Valentino - El Relicario (1923) Brunswick  
Rudolph Valentino - Kashmiri Song (1923) Brunswick  
Ruth Etting - Ain't Misbehavin'  
Ruth Etting - At Sundown (1927)  
Ruth Etting - Because My Baby Don't Mean Maybe (1928)  
Ruth Etting - Exactly Like You (1930)  
Ruth Etting - Goodnight My Love  
Ruth Etting - I'm Nobody's Baby  
Ruth Etting - It All Depends On You (1929)  
Ruth Etting - Lonesome And Sorry (1926) (Columbia 644)

Can someone advise how to achieve this , if possible?

Grateful for any help. 🙂

---

<div class="post-metadata">

### Author: ![anon32189785](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@anon32189785](https://community.mp3tag.de/u/anon32189785)
#### Post date: [August 7, 2025, 4:42am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/2 "2025-08-07T04:42:57Z")

</div>

find: ” (19\d\d)” ← starts with a space!

replace: “ (\1)” ← starts with a space!

Just my 2 cents…

---

<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: [August 7, 2025, 6:08am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/3 "2025-08-07T06:08:10Z")

</div>

You could use Convert Tag -\> Tag to see a preview:

Field:  
\_FILENAME

Format string:  
`$regexp(%_FILENAME%, (19\d\d), ($1))`

 ![image](https://community.mp3tag.de/uploads/default/original/3X/9/f/9fcca75a764b8973e5fd67d7743079d383cf29e7.png)

The substitution `\1` from @anon32189785 means the same as `$1` in this regular expression `$regexp()`.  
The first capturing group is usually referred to as `$1`.

---

<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: [August 7, 2025, 7:23am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/4 "2025-08-07T07:23:54Z")

</div>

@anon32189785 : your suggestion looks like a plain “Replace”, yet the expression is a regular one. So it should be mentioned that the action should be of the type “Replace with regular expression”.

---

<div class="post-metadata">

### Author: ![chayes](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@chayes](https://community.mp3tag.de/u/chayes)
#### Post date: [August 7, 2025, 2:41pm UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/5 "2025-08-07T14:41:00Z")

</div>

Thanks guys - that’s working perfectly! Much appreciated. 🙂 🙂

---

<div class="post-metadata">

### Author: ![anon32189785](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@anon32189785](https://community.mp3tag.de/u/anon32189785)
#### Post date: [August 8, 2025, 4:28am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/6 "2025-08-08T04:28:57Z")

</div>

O well, I am not that firm with the Mp3tag syntax, that’s where I rely on you 🙂 Thanks for helping out…

---

<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: [September 7, 2025, 4:29am UTC](https://community.mp3tag.de/t/putting-brackets-around-the-year-in-the-filename/69332/7 "2025-09-07T04:29:38Z")

</div>

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