Rename folder

I want to rename folders based on tags.

Artist: The Beatles
Album: Abbey Road
Year: 1969

I want to rename the folder to "Beatles, The - [1969] Abbey Road"

Based on this thread: Regular Expressions I thought I had it, but the result is: Beatles - [1969] Abbey Road (Missing ", The")

I've created an action that looks like this:
Format Value "_DIRECTORY": $regexp(%artist%,^The (.+),$1, The) - '['%year%']' %album%

Obviously, if the artist name is missing the "The", the result should be Artist - [Year] Album

So, what am I missing? :unsure:


Inside a scripting function, a comma must be escaped:
$regexp(%artist%,^The (.+),$1',' The) - '['%year%']' %album%

Thanks dano, problem solved!