# Place last two characters of Album in braces

**URL:** <https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059>\
**Category:** Support\
**Created:** [July 30, 2022, 7:41am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059 "2022-07-30T07:41:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [July 30, 2022, 7:41am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/1 "2022-07-30T07:41:04Z")

</div>

Hi,

I have some releases which have EP as the last two characters, eg. `All Cried Out EP`.  
I would like to place the EP in braces, eg. `All Cried Out {EP}`.

I have tried the following:  
Source format: `%album%`  
Guessing pattern: `%album% $right(%releasetype%,2)`

Field: `ALBUM`  
Format string: `%album% {%releasetype%}`

Which results in the following:  
`All Cried Out EP {}`

---

<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:** [July 30, 2022, 7:44am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/2 "2022-07-30T07:44:07Z")

</div>

Try an action of the type "Replace" for ALBUM  
Search string: EP  
Replace string: `{EP}`

It may be safer to activate the "Match word" option.

---

<div class="post-metadata">

**Author:** ![djdizzle](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/d/ed8c4c/32.png) [@djdizzle](https://community.mp3tag.de/u/djdizzle)\
**Post date:** [July 30, 2022, 7:51am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/3 "2022-07-30T07:51:12Z")

</div>

Thanks for that! So much simpler.

---

<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:** [July 30, 2022, 7:58am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/4 "2022-07-30T07:58:32Z")

</div>

Your format string  
`%album% $right(%releasetype%,2)`  
would replace the existing content in %ALBUM% with the content from %ALBUM% and then add the right 2 characters from %RELEASETYPE%. In the second example you put it in `{}`. It seems, that your content in %RELEASETYPE% is empty or at least the 2 right characters in %RELEASETYPE% are empty.  
This result in  
`All Cried Out EP {}`

Please be aware, that replacing EP with {EP} will replace every occurence of EP, also in this example  
`This is EP number 1`  
into  
`This is {EP} number 1`  
not only if EP was found as last two characters in %ALBUM%.

To replace the last two characters in the content of album with curly braces (if this characters are EP), you could use this regular expression:  
`$regexp(%ALBUM%,\s(EP)$, {$1})`  
This searches for a space EP at the end and replace it with a space an opening curly bracket, followed by EP and a closing curly bracket.

---

<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:** [July 30, 2022, 8:46am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/5 "2022-07-30T08:46:09Z")

</div>

Or a filter like  
`%album% HAS " EP"`  
may lead to a lot of hits.  
At least I did not have an album where a word starts with "EP"

---

<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:** [July 30, 2022, 10:11am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/6 "2022-07-30T10:11:11Z")

</div>

There could be some additional infos (at least in my collection) like  
"Microfunk EP, Volume 2"  
or  
"Rare EP Tracks 1961-1966"  
or  
"The Singles, The EP and The Demos"  
or  
"The EP Collection"  
or  
"EP 2010"

---

<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:** [August 29, 2022, 10:11am UTC](https://community.mp3tag.de/t/place-last-two-characters-of-album-in-braces/58059/7 "2022-08-29T10:11:52Z")

</div>

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