# Regex to fix year\\\\year and year\\\\year-month-day

**URL:** https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379
**Category:** Support
**Created:** [April 9, 2018, 12:26pm UTC](https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379 "2018-04-09T12:26:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Zifnab](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/b5a626/32.png) [@Zifnab](https://community.mp3tag.de/u/Zifnab)
#### Post date: [April 9, 2018, 12:26pm UTC](https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379/1 "2018-04-09T12:26:54Z")

</div>

Hello:  
A lot of my files have the year set as one of the following:  
`1977\\1977`  
`2009\\2009-10-12`

All I want is to have just the year, so the two examples here would have 1977 and 2009 as the year. I have tried all sorts of regex formulaes, and they either do nothing or clear everything.  
thanks.

---

<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: [April 9, 2018, 12:54pm UTC](https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379/2 "2018-04-09T12:54:20Z")

</div>

Hi and welcome 🙂

It looks like the files have multiple year fields (you can inspect them individually via the extended tag dialog at Alt + T).

The easiest way to remove them is to use an action "Remove duplicate fields". See this topic for more on actions (in case it's needed).

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967):
>
> Mp3tag provides a variety of actions, which can be applied to filenames and tags. The actions are grouped together into named sets (action groups), which can be applied independently via Alt + 6. If you do not want to create a reusable action group for applying one single action, the Actions (Quick) toolbar button or keyboard shortcut Shift + Alt + 6 can be used. How to [create a new action](https://community.mp3tag.de/t/actions/967/2)? How to ... [change upper/lower case of tag fields or filenames](https://community.mp3tag.de/t/actions/967/3)? [replace the string “xyz” in tag-fields …](https://community.mp3tag.de/t/actions/967/4)

---

<div class="post-metadata">

### Author: ![Zifnab](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/z/b5a626/32.png) [@Zifnab](https://community.mp3tag.de/u/Zifnab)
#### Post date: [April 9, 2018, 1:10pm UTC](https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379/3 "2018-04-09T13:10:34Z")

</div>

Worked like a charm. Thank you very much Florian!

---

<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: [January 6, 2021, 6:50pm UTC](https://community.mp3tag.de/t/regex-to-fix-year-year-and-year-year-month-day/41379/5 "2021-01-06T18:50:57Z")

</div>

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