Before or after deleate button

I am having so much fun with DO at the moment sorting out a very large collection of books and this would help speed thing up.

Example:

Robert A. Heinlein - Starship Troopers.epub

1). I wish to make a button to delete all the characters before and including the "-" so the final result would be "Starship Troopers.epub"

2). I would also like to know how to make a button to delete all the characters after and including the "-" so the final result would be " Robert A. Heinlein.epub"

Thank you for any help. :thumbsup:

Try these:

Rename REGEXP PATTERN "(.*) - (.*)(\..*)" TO \2\3

and

Rename REGEXP PATTERN "(.*) - (.*)(\..*)" TO \1\3

Perfect, just what I needed, thank you so much.