Hi,
I have these file names:
123.456.678-12_draft_123.4567_productname_180606.pdf
The first number before the draft can also be different: 123456-12
Now I want to delete "draft_" and the date at the end of the file name “_180606”.
When I enter this in the multi-rename tool in the Search field, the correct parts of the file name are found:
draft_|(_[0-9]+\.pdf)
RegEx is activated.
When the Replace field is <Clear>, both parts before and after the Pipe character are deleted. This works as expected.
However, when I enter this in the Replace field, the found text in both parts is replaced:
|\.pdf
Both parts are replaced with this: |.pdf
The Pipe character is inserted, although according to the help this should be only a separator.
When I enter this in the Replace field, the replacement does not work either:
<Clear>|\.pdf
Replaced with this in both parts: <Clear>|.pdf
When I deactivate RegEx, the Pipe character works for Replacements.
When I deactivate RegEx and enter <Clear>|.pdf in the Replace field, <Clear> is entered in the first part.
Is this a bug or do I have to change anything?
Another option for my problem is:
Search: (draft_)(.+)(_[0-9]+)
Replace: $2
This works, but this does not explain why the Pipe character cannot be used for replacements with RegEx.
Thank you very much for your help!
Best regards
Winfried
In the multi-rename tool Pipe with RegEx does not work
Moderators: white, Hacker, petermad, Stefan2