me again. Following up on chrillek’s suggestion to learn RegEx I have progressed a lot using the helpful mentioned sites here in the community (esp. Learn Regex: A Beginner's Guide — SitePoint and Regular Expression Tutorial - Learn How to Use Regular Expressions) and checking my work on https://regex101.com.
Now I have come to a blocker and I need some help. I am trying to remove underscores from my file names. There is an Apple Script to replace text which works, but I would love to use RegEx to replace the underscores. The reason is that I can automate this and using the script is tiresome after a while (entering “_” and then " ") for every file.
I tryed several versions:
Regular Expression: _
Change name to:
This worked on the regex101 site but not in DEVONthink
Then I tried several other variants and one option I found was:
Regular Expression: (.)(_)(.)
Change Name to: \1 \3
However, this only changes on underscore and I have to repeat this Smart Rule multiple times.
Does anyone have an idea how I can either run this replacement until no other underscore is found or
does anyone have a better idea?
I read that Applescript could do the trick but I don’t know this language, and unfortunately I am missing the time to learn it, so I am trying with RegEx.
What works is that I can copy the skript from Bluefrog from this post, but I as I do not understand what it does I fear I might corrupt my filenames.
Thank you very much!