# Jgnore part of tag in expresion

**URL:** <https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415>\
**Category:** Support\
**Created:** [December 1, 2015, 12:26am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415 "2015-12-01T00:26:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smugalugs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@smugalugs](https://community.mp3tag.de/u/smugalugs)\
**Post date:** [December 1, 2015, 12:26am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/1 "2015-12-01T00:26:37Z")

</div>

I want to modify my artistsort and composersort actions (simple reversed names of artist and composer) to ignore additional artists/composers.  
I use:  
$regexp(%composer%,(._) (._),$2',' $1)  
Which converts:  
Big Bubba  
into:  
Bubba, Big  
and seems to work with most names including initials. I can't make it work with multiple names however. I decided the easiest way was to chose the major artist/composer and include the rest in brackets then include an expression to exclude the bracket contents in the action to reverse the name. I found this:  
,(.+?)  
However I can't figure out where to place it in the expression.  
I would prefer a complete expression that sorts by the first artist/composer and ignores the rest. For example:  
Artist: Big Bubba, Miss Piggy, Donald Duck  
Into:  
Artistsort: Bubba, Big  
Regards

---

<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:** [December 1, 2015, 7:18am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/2 "2015-12-01T07:18:43Z")

</div>

> [@smugalugs](#):
>
> ...  
> Artist: Big Bubba, Miss Piggy, Donald Duck  
> Into:  
> Artistsort: Bubba, Big  
> Regards

Try "Format value" for ARTISTSORT  
Format string: $regexp(%artist%,'(.+?) (.+?),.\*$','$2, $1')

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [December 1, 2015, 8:08am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/3 "2015-12-01T08:08:50Z")

</div>

> [@smugalugs](#):
>
> I want to modify my artistsort and composersort actions (simple reversed names of artist and composer) to ignore additional artists/composers. ... Artist: Big Bubba, Miss Piggy, Donald Duck ... Into: Artistsort: Bubba, Big

**ARTISTSORT \<== $regexp(%ARTIST%,'(.+?)\s(.+?)(,.+?)\*$','$2, $1')**

DD.20151201.1008.CET

---

<div class="post-metadata">

**Author:** ![smugalugs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@smugalugs](https://community.mp3tag.de/u/smugalugs)\
**Post date:** [December 1, 2015, 8:58am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/4 "2015-12-01T08:58:45Z")

</div>

Thank you. They both seem to give the intended result. Much appreciated.  
Regards

---

<div class="post-metadata">

**Author:** ![smugalugs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@smugalugs](https://community.mp3tag.de/u/smugalugs)\
**Post date:** [December 1, 2015, 9:10am UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/5 "2015-12-01T09:10:44Z")

</div>

> [@DetlevD](#):
>
> **ARTISTSORT \<== $regexp(%ARTIST%,'(.+?)\s(.+?)(,.+?)\*$','$2, $1')**
> 
> DD.20151201.1008.CET

Actually this works better because it also works with single artist sort so I don't have to change actions.  
Regards

EDIT: Is there a way to make this work with artists that have initials?  
For example:  
Artist:  
Big B. Bubba, Miss Piggy  
Artistsort:  
Bubba, Big B.

At present it formats to:  
B. Bubba, Big

Regards

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [December 1, 2015, 2:36pm UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/6 "2015-12-01T14:36:46Z")

</div>

> [@smugalugs](#):
>
> ... EDIT: Is there a way to make this work with artists that have initials? ...

**ARTIST \<== 'Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba' ARTIST \<== 'Big Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big' ARTIST \<== 'Big B. Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big B.' ARTIST \<== 'Big B. Bubba, Miss Piggy, Donald Duck' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big B.' ARTIST \<== 'Bubba, Piggy, Duck' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba'**

DD.20151201.1636.CET

---

<div class="post-metadata">

**Author:** ![smugalugs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/e19b73/32.png) [@smugalugs](https://community.mp3tag.de/u/smugalugs)\
**Post date:** [December 1, 2015, 9:37pm UTC](https://community.mp3tag.de/t/jgnore-part-of-tag-in-expresion/17415/7 "2015-12-01T21:37:00Z")

</div>

> [@DetlevD](#):
>
> **ARTIST \<== 'Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba' ARTIST \<== 'Big Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big' ARTIST \<== 'Big B. Bubba' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big B.' ARTIST \<== 'Big B. Bubba, Miss Piggy, Donald Duck' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba, Big B.' ARTIST \<== 'Bubba, Piggy, Duck' ARTISTSORT \<== $regexp($regexp(%ARTIST%,'^(.+?)(,.+?)$','$1'),'^(.+)\s(.+)$','$2, $1') ARTISTSORT ==\> 'Bubba'**
> 
> DD.20151201.1636.CET

Thanks. This works beautifully.  
Regards

---

<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/jgnore-part-of-tag-in-expresion/17415/8 "2026-02-09T12:25:59Z")

</div>

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


