Looking to set up some rules to my mp3 collection so files will look like this
Song Title (feat. Xyz) [Abc remix]
I currently have a bunch of files that look the opposite so
Song Title [Abc Remix] (feat. Xyz)
Is there any way to swap these over en masse?
You could use an action of the type "Format Tag-Field" for TITLE
Enter as format string: $regexp('%title%','(.*) (\[.*\]) (\(.*\))',$1 $3 $2)
You should get the same result with an action of the type "Replace with regular expression" for TITLE
Enter as search string: (.*) (\[.*\]) (\(.*\))
Enter as replace string:$1 $3 $2
Or enter
$regexp('%title%','(.*) (\[.*\]) (\(.*\))',$1 $3 $2)
in the Convert>tag-tag
function for %title%
Here is a somewhat unusual proposal, but it works.
Begin Action Group Test_2014#20140501.Guttersnipe (1)
Action #1
Actiontype 5: Format value
Field ______: TITLE
Formatstring: $replace(%TITLE%,' (','\\',') [','\\',']','\\')
... or ...
Formatstring: $regexp(%TITLE%,'\s*(?:(|)\s+[|])\s*','\\')
Action #2
Actiontype 5: Format value
Field ______: TITLE
Formatstring: $meta(TITLE,0)' ['$meta(TITLE,2)'] ('$meta(TITLE,1)')\\'
End Action Group Test_2014#20140501.Guttersnipe (1) (2 Actions)
Here is a proposal, which swaps a character sequence, enclosed into round brackets, ...
with a following character sequence, enclosed into square brackets, and vice versa.
Begin Action Group Test_2014#20140501.Guttersnipe (2)
Action #1
Actiontype 5: Format value
Field ______: TITLE
Formatstring: $if($eql('()',$regexp(%TITLE%,'[^][()]',)),$regexp(%TITLE%,'^(.?)((.+?))(.)([.+?])(.?)$','$1$4$3$2$5'),$if($eql('',$regexp(%TITLE%,'[^][()]',)),$regexp(%TITLE%,'^(.?)([.+?])(.)((.+?))(.?)$','$1$4$3$2$5'),%TITLE%))
End Action Group Test_2014#20140501.Guttersnipe (2) (1 Action)
DD.20140501.2030.CEST, DD.20140502.1110.CEST, DD.20140506.1200.CEST