Regex to swap title and author

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
louwin
Member
Member
Posts: 114
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Regex to swap title and author

Post by *louwin »

Sorry, I've done a search and can't actually find this in previous messages :(

I have thousands of books with names in the form....

"A Book Title - A N Author" and could some genius show me the regex to change this to -> "A N Author - A Book Title" using MultiRename of course

I apologize if this HAS been done before as I couldn't find it :(
There are 10 types of people in the world,
Those who understand binary and those who don't.
User avatar
Gral
Power Member
Power Member
Posts: 1473
Joined: 2005-01-26, 15:12 UTC

Re: Regex to swap title and author

Post by *Gral »

It is even in TC help.
To swap the title and interpret in the file name of an mp3 file, when they are separated by a dash (Title - Interpret.mp3), use the following options:
Search for: (.*) - (.*)\.mp3
Replace by: $2 - $1.mp3
Here $1 means the text in the first round bracket, and $2 the text in the second round bracket.
User avatar
louwin
Member
Member
Posts: 114
Joined: 2007-06-09, 11:22 UTC
Location: Perth, Western Australia

Re: Regex to swap title and author

Post by *louwin »

Sorry! Searched the forum but NEVER thought to search the Help file :(

They're epubs but it worked perfectly - THANKS
There are 10 types of people in the world,
Those who understand binary and those who don't.
Post Reply