You are not logged in.
Pages: 1
I am a newbie to the program and have reviewed the prior posts on RegEx, etc. that allow you to move/swap certain part of a file name but still do not fully understand/can get it to work.
Assume I have the following file name
420-001-corr-filename-2019-03-29
I want to move the date to be after the word "corr"
420-001-corr-filename-2019-03-29
The length of the filename may vary from file to file.
The date is always in YYYY-MM-DD format.
The beginning of the file name will always be in the same format (XXX-XXX); although the actual numbers will differ from file to file.
I think I need to count the characters from the end and then insert at character 13.
Any help would be greatly appreciated.
Offline
Try the Regular Expression rule with:
(corr)(-.*)(-\d\d\d\d-\d\d-\d\d)
$1$3$2
Basically this will find the "corr"-part($1), the date-part($3) and the part inbetween ($2) and puts it into the wanted order.
Offline
Incredibly helpful, @jogiwer! Thank you!!
It works as I need. Again, thank you. It was also very helpful you noted which part is which. I will need to read up about Regular Expressions.
Offline
Pages: 1