How to NOT change the last part of a file?

Advanced Renamer forum
#1 : 04/02-23 06:41
Rikard Österman
Rikard Österman
Posts: 1
I've just stumbled upon this great program, but I just don't understand all these regular expressions and stuff. I've been looking at the forum but still don't understand how to solve my problem.

Is there a way to NOT change, or to protect the last part of a filename, when using the "New Name" feature ?

Example: ""

I want to change the first part, but the "" should always stay the same as the original.
The total length of the filename is not always the same.


04/02-23 06:41 - edited 04/02-23 07:09
#2 : 04/02-23 09:00
David Lee
David Lee
Posts: 1125
There is a good basic intro to regular expressions in the User Guide: ar_expresions

If we assume that the text that you wish to keep is always in the format "-19.9C_0001" ie a string commencing with "-" then you can use "-" as a separator.

Try a Replace method...

Replace: .*(-[^-]*$)
with: New_Text\1
Use regular expressions

04/02-23 09:00