#1 : 19/11-23 10:24
I have file names that end with the following pattern:
<string1> - <string2> - <string3> press
I wanted to remove the " - <string3> press" part at the end.
I tried to use the "Remove Pattern" rule, and specified the following string:
In normal mode, the file names are not affected at all.
In RegEx mode, AR ends up removing " - <string2> - <string3> press" because of greedy matching.
How do I force the RegEx engine to match in lazy mode?
I tried adding a ? to force lazy mode, like this:
But it did not change the result.
#2 : 19/11-23 18:24
Reply to #1: Hi.
Try this .
Text to be replaced: ^(.+)-.+$
Replace with: $1
Occurrence : All
Use regular expressions
Aply to name
I hope that work
#3 : 19/11-23 18:59
Reply to #2:
Thanks for the rapid solution!
That said, is there a formula to force lazy mode in RegEx?
It would be nice to know that method for future needs.
19/11-23 18:59 - edited 19/11-23 19:05