Replace with ... by match case

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Replace with ... by match case

Postby Badspot » Fri Jul 24, 2015 9:00 pm

So, I have following problem. I'm replacing files and folders names, obviously. But there's a problem.

I'm using Replace ... with ... -> It allows an option "match case" to match a whole case. So, but now I occured following problem:

filenames:
KilesProgressive
ogreCase

Replace: ogre
with: chucki
match whole case: On

Now what happened? First it replaced ogre with chucki, which was correct. But the other thing: Exactly, it replaced KilesProgressive to KilesPrchuckissive. That's wrong! That's exactly what I didn't want. I was desperately looking for an option that would only search for the whole word "ogre" or atleast only at the beginning at the line. (like : ogreBlah, ogreHere, etc.)

Is there any possibility to get this or maybe a RegEx way?
Badspot
 
Posts: 1
Joined: Fri Jul 24, 2015 8:50 pm

Re: Replace with: match case AND whole word only

Postby Stefan » Mon Aug 31, 2015 9:01 am

Q: looking for an option that would only search for
     the whole word "ogre" ... at the beginning at the line. (like : ogreBlah, ogreHere, etc.)
      with an option "match case"


FROM:
KilesProgressive.txt
ogreCase.txt
OgreCase - Kopie.txt

TO:
KilesProgressive.txt
chuckiCase.txt
OgreCase - Kopie.txt


USE:
RegEx(1)
Match: ^ogre(.+)$
Repla: chucki\1


- - -


To match case-insensitive (ogreCase.txt AND OgreCase - Kopie.txt), use: ^[Oo]gre(.+)$



FROM:
KilesProgressive.txt
ogreCase.txt
OgreCase - Kopie.txt

TO:
KilesProgressive.txt
chuckiCase.txt
chuckiCase - Kopie.txt


USE:
RegEx(1)
Match: ^[Oo]gre(.+)$
Repla: chucki\1



- - -


"Keep case" alternation is not possible:

ogreCase.txt
OgreCase - Kopie.txt

chuckiCase.txt
ChuckiCase - Kopie.txt



 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to BRU Support