If I have a title of Symphonie Fantastique - I. Reveries - Passions and run a tag to tag function with a format string of
$regexp(%title%,'^.?\b(Concerto|Symphony|Suite|Sonata|Quartet|Quintet|Trio)\b.*',$1)
It returns Symphonie Fantastique - I. Reveries - Passions, instead of a blank or null string, as I'd expect. Is this expected behavior? Is there a way to get it to return an empty/null string if a match is not found?
My workaround is:
$iflonger($trim($regexp(%title%,'^.?\b(Concerto|Symphony|Suite|Sonata|Quartet|Quintet|Trio)\b.*',$1)),0,$regexp(%title%,'^.?\b(Concerto|Symphony|Suite|Sonata|Quartet|Quintet|Trio)\b.*',$1),'')
It works, but is kind of complicated. Any ideas?