Need format string to get data in front of first //

I already tried my *** off.

I want a format string that:

  • if there is no " // " just copy everything in the tag "Artist" to "Album Artist"

  • if there is " // " just copy everthing before the first " // " from "Artist" to "Album Artist"

I already tried this but if there is no " // " it leaves "Album Artist" blank:

$if($strstr(%artist%, '// '), $left(%artist%, $sub($strstr(%artist%, '// '), 1)), %artist%)

Are you sure that it is // and not \\?

Screenshot 2024-10-29 180109

I was just asking as the \\ indicate a multi-value field.
But as the slashes are //
Try an action of the type "Format value" or use Convert>Tag-Tag for ALBUMARTIST
Format string: $regexp(%artist%,(.*?) //.*,$1)

Thank you that works exactly how i wanted to.