RegEx rename: Replace last occurrence of dash
Posted: 11 Aug 2016 21:14
Hey community,
for now I'm using the really great "Bulk Rename Utility" to rename my files.
But I wish to have a smoother workflow so I think about using XYplorer to rename my files.
I have several files named TAG1 - TAG2 - TAG3 - TAG4,TAG5.xyz for example.
The TAGs after the last dash have to be in brackets and the last dash should be removed.
TAG1 - TAG2 - TAG3 - TAG4,TAG5.xyz
TAG1 - TAG2 - TAG3 (TAG4,TAG5).xyz
In the Bulk Rename Utility I'm using (.*) - (.*)$ for matching and \1 (\2) for replacing. But it's not RegEx compliant, so that won't work with XYplorer.
Could somebody help me out with a correct RegEx?
Thanks!
Tom
for now I'm using the really great "Bulk Rename Utility" to rename my files.
But I wish to have a smoother workflow so I think about using XYplorer to rename my files.
I have several files named TAG1 - TAG2 - TAG3 - TAG4,TAG5.xyz for example.
The TAGs after the last dash have to be in brackets and the last dash should be removed.
TAG1 - TAG2 - TAG3 - TAG4,TAG5.xyz
TAG1 - TAG2 - TAG3 (TAG4,TAG5).xyz
In the Bulk Rename Utility I'm using (.*) - (.*)$ for matching and \1 (\2) for replacing. But it's not RegEx compliant, so that won't work with XYplorer.
Could somebody help me out with a correct RegEx?
Thanks!
Tom