Hi Guys,
Apologies if this has been answered, but I have searched the forum for a solution many times on separate days and looked at the help section on regular expressions for something similar to what I want to do but have not found anything yet. I'm sure that if someone can please help me with a Match/Replace RegEx (1) that works it will finally make sense to me.
What I want to do is change the file names so that the first two digits of the file name are retained in positions 1-2, replace the pattern of " - " in positions 3-5 only with "-APPLE01-" and replace the other occurrences of " - " in the remaining character positions of the file name with "-" no matter how many times it is repeated.
For Example:
01 - This is - the first file name.txt
02 - This is the - second - file - name.txt
03 - This the third file name.txt
Would be changed to:
01-APPLE01-This is-the first file name.txt
02-APPLE01-This is the-second-file-name.txt
03-APPLE01-This is the third file name.txt
Is there a regular expression that will do this in one sweep to a group of selected file names in a folder? I tried using the Replace (3) Replace/With function but it replaces all the " - " strings in the file name. For example, my file names would be changed to:
01-APPLE01-This is-APPLE01-the first file name.txt
02-APPLE01-This is the-APPLE01-second-APPLE01-file-APPLE01-name.txt
Thanks!
Ed