Everything Rename (1351)
is this right?
source:
cancersurvivorspark281560
cancersurvivorspark171547
cancersurvivorspark161548
cancersurvivorspark151546
cancersurvivorspark141544
old: cancersurvivorspark%115%2
new: cancersurvivorspark%115%2 - park%1
renamed:
cancersurvivorspark281560 - park28.jpg
cancersurvivorspark171547 - park17.jpg
cancersurvivorspark161548 - park16.jpg
cancersurvivorspark151546 - park.jpg
cancersurvivorspark141544 - park14.jpg
shouldn't 151546 have ended up at 15 ?
same results with regex: (still missing, 15)?
old: ^cancersurvivorspark(.*?)15(.*?)$
new: cancersurvivorspark\115\2 - park\1
.
Everything Rename globbing error
Re: Everything Rename globbing error
When 'normal' Everything search replace is activated (as in your first example), the %1 syntax uses lazy matching (expressed in regex terminbology)
So for filename cancersurvivorspark151546, old syntax cancersurvivorspark%115%2 will search for the first 15 after cancersurvivorpark and calls that %1. In this case cancersurvivorpark and 15 are right beside each other, making %1=<nothing>
In the regex example, (lazy) matches zero or more characters, making the first capture group (.*?) empty.
Which causes \1 to be empty.
This can be solved for this specific case by using (.+?) instead of (.*?) for the first capture group as matches one or more characters:
(all untested, btw)
So for filename cancersurvivorspark151546, old syntax cancersurvivorspark%115%2 will search for the first 15 after cancersurvivorpark and calls that %1. In this case cancersurvivorpark and 15 are right beside each other, making %1=<nothing>
In the regex example,
.*?
Which causes \1 to be empty.
This can be solved for this specific case by using (.+?) instead of (.*?) for the first capture group as
.+
Code: Select all
OLD = ^cancersurvivorspark(.+?)15(.*?)$
(all untested, btw)
Re: Everything Rename globbing error
I'll just note that the regex: version I show above, is what was Everything came up with, by default.
And with that (.+) [at \1] looks to be OK.
And with that (.+) [at \1] looks to be OK.