# Format Genre as First Letter of Album Artist

**URL:** <https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322>\
**Category:** Support\
**Created:** [November 12, 2014, 9:31pm UTC](https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322 "2014-11-12T21:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moosefist](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/898d66/32.png) [@moosefist](https://community.mp3tag.de/u/moosefist)\
**Post date:** [November 12, 2014, 9:31pm UTC](https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322/1 "2014-11-12T21:31:02Z")

</div>

I might can figure this out, but it would be great if someone could point me in the right direction. Ive tried searching the forum (both through google and the built in search).

I use my Genre field to organize my tracks by the first letter of the usually the artist.

If the artist is not a letter of the alphabet it needs to be formatted as a '#' sign. Need to skip omit 'the' from the formatting also.

I am guessing i need to look into regex?

This is kinda working:

$ifgreater($len(%ARTIST%),$len($regexp(%ARTIST%,'^[^[:alpha:]]',)),'#',$upper($left(%ARTIST%,1)))

I just need to figure out how to make it exclude 'The'

---

<div class="post-metadata">

**Author:** ![vkostas](https://community.mp3tag.de/user_avatar/community.mp3tag.de/vkostas/32/227_2.png) [@vkostas](https://community.mp3tag.de/u/vkostas)\
**Post date:** [November 12, 2014, 10:42pm UTC](https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322/2 "2014-11-12T22:42:17Z")

</div>

$regexp($upper($regexp(%artist%,'^\s_The\s+(.)._$|^(.)._$|^($)','$1$2$3')),'[:alpha:]','#')  
Use following if you really want to extend the leading articles to be excluded.  
$regexp($upper($regexp(%artist%,'^\s_(?:(?:(?:In|On|At)\s)?(?:A|An|The))\s+(.)._$|^(.)._$|^($)','$1$2$3')),'[:alpha:]','#')

---

<div class="post-metadata">

**Author:** ![moosefist](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/898d66/32.png) [@moosefist](https://community.mp3tag.de/u/moosefist)\
**Post date:** [November 12, 2014, 10:59pm UTC](https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322/3 "2014-11-12T22:59:37Z")

</div>

Thanks. That works!

---

<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:** [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/format-genre-as-first-letter-of-album-artist/16322/4 "2026-02-09T12:25:22Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


