Thank you @BLUEFROG, that worked on a small test. However, I just ran it on a larger batch and it removed the whole filename except the last word (much like the expected results from the screenshot below)
As I’m still in the process of learning how to use and manipulate RegEX, could you please explain why my RegEx in the example above didn’t work in DEVONthink whereas it did in A Better Rename?
Is there something wrong with the syntax I posted above that DEVONthink doesn’t interpret?
Also, does DEVONthink not recognise $ in the destination pattern, only \?
I think the confusion arises, when trying to learn to use RegEx, there seems to be different flavours which produce different results? See below:
I hadn’t even noticed the $ but you should use \n.
Yes, there are different flavors of RegEx. As noted in the Help > Documentation > Appendix > Smart Rule Events and Actions, for the Scan Text and Scan Name smart rule actions, we use NSRegularExpression which conforms to ICU RegEx.