# Parse filename to extract text to add to Title

**URL:** https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055
**Category:** Support
**Created:** [April 1, 2025, 10:26pm UTC](https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055 "2025-04-01T22:26:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![DonJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/85f322/32.png) [@DonJ](https://community.mp3tag.de/u/DonJ)
#### Post date: [April 1, 2025, 10:26pm UTC](https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055/1 "2025-04-01T22:26:28Z")

</div>

I can't find anything in the Help so I'll ask here :

From this filename "DesertIslandDiscs-19911027-AlanAlda" I would like to parse out the year '1991' and add it to the Title ( Alan Alda ) of the episode, preceded by a " - ".  
If that can't be done, replace the Title to read "Alan Alda - 1991".  
I hope this is doable. Thanks for looking at this.

Don

---

<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: [April 2, 2025, 5:21am UTC](https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055/2 "2025-04-02T05:21:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DonJ](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/85f322/32.png) [@DonJ](https://community.mp3tag.de/u/DonJ)
#### Post date: [April 2, 2025, 2:35pm UTC](https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055/3 "2025-04-02T14:35:12Z")

</div>

Thanks for the quick response. It works perfectly!

---

<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: [May 2, 2025, 2:35pm UTC](https://community.mp3tag.de/t/parse-filename-to-extract-text-to-add-to-title/68055/4 "2025-05-02T14:35:53Z")

</div>

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