Hi Donald and XyUsers,
i just stumbled upon an effect i consider a small bug (but not sure if it is my failure).
I tried to rename a bunch of files with a regex rename. I wanted to insert a part of the source filename into parenthis. E.g.
"My Holiday - In Australia.doc" -> "My Holiday (In Australia).doc"
I tried the following regex rename pattern: " - In (.+) > (In $1)"
This worked fine, except that the last (closing) parenthis was not inserted in the resulting filename. All other parts of the filename were exactly what i wanted though. Just the last parenthis was missing.
So the result of the a.m. operation was like this:
"My Holiday - In Australia.doc" -> "My Holiday (In Australia.doc"
So i tried to do a workaround with this regex pattern: - In (.+).doc > (In $1).doc
And voila! The closing parenthis was there now. So i solved my renaming problem to exactly what i needed and wanted. But it looks strange to me, that the first pattern sends the closing parenthis to nirvana or wherever.
I also tried to escape the parenthis with \( and \). But that resulted in an invalid result filename (inserting literally \( and \) into the resulting filename). So i learned that i dont have to escape special characters on the right side of the regex operator. CHECK! NOTED! LEARNED!
So i wonder: Is this "no no closing parenthis at the end if you dont append the file extension" behaviour by design (of Xy and/or RegEx engine) and so definitely my failure or is this maybe a glitch in the regex rename functionality?
Would be happy to get a short response that clarifies it for me.
Thank you in advance.
Greetings
JoTo
XYplorer Beta Club