# Regex problem - Shortening multiple field entries

**URL:** <https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560>\
**Category:** Support\
**Created:** [June 19, 2012, 10:14am UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560 "2012-06-19T10:14:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiboy6](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/d9b06d/32.png) [@kiboy6](https://community.mp3tag.de/u/kiboy6)\
**Post date:** [June 19, 2012, 10:14am UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560/1 "2012-06-19T10:14:50Z")

</div>

I use the following replace with regex to shorten multiple entries in the ARTIST field to only the first artist.

When I have multiple artists they are always saparated by " / " so i use the following regex

Regex ARTIST ./. --\> ""

This works fine almost all the time. However it causes me a problem if there is a "." in the artist name.

ie. For some reason this will make "R. Kelly" --\> "R"

How can I make this regex only pick up the forward slash (/) and not pick up a "." ?

Thanks very much if you can help 🙂

---

<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:** [June 19, 2012, 10:43am UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560/2 "2012-06-19T10:43:21Z")

</div>

> [@kiboy6](#):
>
> I use the following replace with regex to shorten multiple entries in the ARTIST field to only the first artist. When I have multiple artists they are always saparated by " / " so i use the following regex  
> Regex ARTIST ./. --\> ""  
> ... it causes me a problem if there is a "." in the artist name.

Action: Format value  
Field: ARTIST  
Formatstring: **$regexp(%ARTIST%,' / .+$',%DUMMY%)**  
From: "A / B / C / D / E"  
To: "A"

DD.20120619.1442.CEST

... or ...  
Action: Format value  
Field: ARTIST  
Formatstring: **$left(%ARTIST%,$sub($strstr(%ARTIST%,' / '),1))**  
From: "A / B / C / D / E"  
To: "A"

DD.20120620.0947.CEST

---

<div class="post-metadata">

**Author:** ![kiboy6](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/k/d9b06d/32.png) [@kiboy6](https://community.mp3tag.de/u/kiboy6)\
**Post date:** [June 20, 2012, 2:52am UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560/3 "2012-06-20T02:52:05Z")

</div>

Awesome - that did the trick perfectly...thanks very much 🙂

> [@DetlevD](#):
>
> Action: Format value  
> Field: ARTIST  
> Formatstring: **$regexp(%ARTIST%,' / .+$',%DUMMY%)**  
> From: "A / B / C / D / E"  
> To: "A"
> 
> DD.20120619.1442.CEST

---

<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:** [April 12, 2014, 3:47pm UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560/4 "2014-04-12T15:47:56Z")

</div>

> [@DetlevD](#):
>
> Action: Format value  
> Field: ARTIST  
> Formatstring: **$regexp(%ARTIST%,' / .+$',)**  
> From: "A / B / C / D / E"  
> To: "A"
> 
> DD.20120619.1442.CEST
> 
> ... or ...  
> Action: Format value  
> Field: ARTIST  
> Formatstring: **$left(%ARTIST%,$sub($strstr(%ARTIST%,' / '),1))**  
> From: "A / B / C / D / E"  
> To: "A"
> 
> DD.20120620.0947.CEST

---

<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:23pm UTC](https://community.mp3tag.de/t/regex-problem-shortening-multiple-field-entries/13560/5 "2026-02-09T12:23:54Z")

</div>

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


