ismaelgv / rnr

A command-line tool to batch rename files and directories
MIT License
457 stars 15 forks source link

Renaming file names with regex pattern starting with minus sign "-" #46

Open sabarish-vm opened 2 weeks ago

sabarish-vm commented 2 weeks ago

Hi, Thanks for the amazing tool. When I use regex patterns that start with a minus sign, it fails to recognize the pattern. I also tried escaping the minus with backslash and that it did not work either. Am I missing something ?

image

sabarish-vm commented 2 weeks ago

Adding a -- in front of all the regexp patterns (or equivalently after rnr) fixed it. Maybe this could be mentioned in the README and in the --help message.

ismaelgv commented 2 weeks ago

I'm happy to see that you found the solution. I wasn't aware of that particular case.

I will update the documentation with the details, thanks.