The answers provided in the topic mentioned in the title almost satisfy this problem, but isn't as general as it could be (I think).
I have authors names (firstname(s) middle(s) lastname) appearing before titles with one hyphen as a separator. The lastname is always the last word before the first hyphen.
A. Bertram Chandler - Big Black Mark.pdf
Alan Dean Foster - Cyber way.pdf
Alastair Reynolds - Diamond Dogs.pdf
Alan F. Troop - Dragon DelaSangre.pdf
J. R. R. Tolkien - THe Fellowship of the Ring
Barb & J. C. Hendee - Noble Dead 01 - Dhampir.pdf
I'd like to be able to reorder the names and place them at the back of the line with a '$' separating the title from the author. Like this....
Big Black Mark.pdf $ Chandler, A. Bertram
Cyber way.pdf $ Foster, Alan Dean
Diamond Dogs.pdf $ Reynolds, Alastair
Dragon DelaSangre.pdf $ Troop, Alan F.
THe Fellowship of the Ring $ Tolkien, J. R. R.
Noble Dead 01 - Dhampir.pdf $ Hendee, Barb & J. C.
I've played around with identifying the name parts as \1, \2 etc. but I haven't found out how to allow for the variability in the number of name parts.
Thanks in advance.