When there are an odd number of the same letter in a row, with all but the last letter uppercase, search and replace of "Xx" to "XX" does not change the last lowercase character. For example using the expression "Xx/XX" in Rename Special > Search and Replace,
XXx-abx.txt does not change at all
XXx-Xx-abx.txt changes to XXx-XX-ab.txt instead of XXX-XX-abx.txt
XXXx-abx.txt changes to XXXX-abx.txt [ok]
XXXXx-abx.txt does not change at all XXxxx-abx.txt changes to XXXXx-abx.txt instead of XXXXX-abx.txt
So if this is a feature and not a bug, I have to do one rename of Xx/XX for even counts and XXx/XXX for the odd counts?
[Using 17.50.0218]
Last edited by Jerry on 17 Feb 2017 16:21, edited 1 time in total.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.
Gandolf wrote:I think that XXxxx-abx.txt should change to XXXxx-abx.txt, unless you are talking about a recursive replace.
Actually, I think I agree with you on that; not sure why I included that example.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.
admin wrote:All others end up with all capital Xs.
Without the /c switch, right?
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.
Ok, I guess the rule to remember here is that the string matching proceeds from left to right with no overlapping. So the "Xx" matches the first XX, takes those 2 characters out of consideration for further matching and moves along. This is also the way Notepad does its case-insensitive search and replace too.
But it does seems surprising initially to see the string "Xx" appear in a name and find that the basic case-insensitive search and replace may not work on it, if that string does not appear in isolation from other "X's". Understandable, but surprising.
Case closed.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, over 26 external USB3 drives attached via multiple powered hubs with letters and mount points, totaling 120+ TB.