Regex problem - Shortening multiple field entries

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 :slight_smile:

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

Awesome - that did the trick perfectly...thanks very much :slight_smile: