Open w4hnsinn opened 7 years ago
Nice bug report. It looks like the REGEX engine is built for ascii and giving ascii characters instead of unicode ones. The code is a big hack in the end so it might be from there. It's at https://github.com/wernight/renameit/blob/master/apps/Rename-It!/src/IO/Renaming/Filter/SearchReplaceFilter.cpp#L139 and using CString.MakeLower
or MakeUpper
.
Much like in previous versions or Rename-It, RegExp will usually (=with most regexp) not work as intended or at all, unless "Replace once" is checked as well.
I've seen this with several different types of Regular Expressions, this is just one example:
I was trying to simulate the "Word Case" replacement (because that one's broken too, see issue: #41 ) by means of RegExp.
Specifically, I was matching lower-case letters preceded by a space character: " ([a-z])" ..and trying to replace them with " \1" ..while having enabled the option: Change Case: UPPERCASE
As it turns out, this only works if the option "Replace Once" is also enabled. See screenshot for clarification, upper is with "Replace Once" enabled, lower without. Observe the preview field: http://i.imgur.com/35WLgNr.jpg
Note that this is NOT just a faulty preview, I have tried to actually run the rename like in the lower screenshot, and it fails with: ...problems have been detected.. invalid file name...contains forbidden characters...
I'm using v4 Alpha with the (highly appreciated) x64 context menu patch by Mr Pischedda