# Extract & move year from title

**URL:** <https://community.mp3tag.de/t/extract-move-year-from-title/62270>\
**Category:** Support\
**Created:** [October 1, 2023, 7:28pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270 "2023-10-01T19:28:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbrazil05](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mbrazil05](https://community.mp3tag.de/u/mbrazil05)\
**Post date:** [October 1, 2023, 7:28pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/1 "2023-10-01T19:28:00Z")

</div>

how do I Extract the year from title: Still In The Groove 1981

As you can see the year is one space separated from the title. Is there a way to just extract the "1981" AND PLACE IT INTO THE YEAR TAG?

---

<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:** [October 1, 2023, 7:43pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/2 "2023-10-01T19:43:57Z")

</div>

Try an action of the type "Format value" or use the function Convert\>Tag-Tag for the field YEAR  
Format string: `$regexp(%title%,.*(\d\d\d\d),$1)`

---

<div class="post-metadata">

**Author:** ![mbrazil05](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mbrazil05](https://community.mp3tag.de/u/mbrazil05)\
**Post date:** [October 1, 2023, 8:06pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/3 "2023-10-01T20:06:08Z")

</div>

> [@ohrenkino](#):
>
> `$regexp(%title%,.*(\d\d\d\d),$1)`

Ok.. it put the year in the year tag field..BUT it did not remove the "year" from the title. Any ideas on how to do that?

---

<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:** [October 1, 2023, 8:08pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/4 "2023-10-01T20:08:19Z")

</div>

create an action group that first fills YEAR as described above.  
Then add another action of the type "Format value" this time for TITLE  
Format string: `$regexp(%title%,(.*) \d\d\d\d,$1)`

---

<div class="post-metadata">

**Author:** ![mbrazil05](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mbrazil05](https://community.mp3tag.de/u/mbrazil05)\
**Post date:** [October 1, 2023, 8:20pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/5 "2023-10-01T20:20:33Z")

</div>

PERFECT! THANKS this is what I needed.

extra question. what is the difference between %title% and Title when it comes to tag fields?

---

<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:** [October 1, 2023, 8:23pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/6 "2023-10-01T20:23:46Z")

</div>

TITLE is the name of the tag field - which defines a target.  
%title% refers to the contents of the named tag field.

---

<div class="post-metadata">

**Author:** ![mbrazil05](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9d8465/32.png) [@mbrazil05](https://community.mp3tag.de/u/mbrazil05)\
**Post date:** [October 1, 2023, 8:45pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/7 "2023-10-01T20:45:00Z")

</div>

What is the difference?

---

<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:** [October 1, 2023, 9:06pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/8 "2023-10-01T21:06:37Z")

</div>

Actually, I don't understand the question.  
All field selection lists need only the field name without %.  
If you want to enter a format string, then the field reference has to be distinguishable from plain text. For that you need the % around the field reference.

---

<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:** [October 31, 2023, 9:06pm UTC](https://community.mp3tag.de/t/extract-move-year-from-title/62270/9 "2023-10-31T21:06:54Z")

</div>

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