I am making an Automator application and I need to replace some text based on a certain criteria. I am wondering if there is an Automator action for performing a regex text replacement.
If not, I always have the option to run an AppleScript that can do this, but I really don't know how to write AppleScript code.
Thanks!
There's no dedicated Automator action for this, but you can use the "Run Shell Script" action. It can receive its input on stdin or as arguments, and you can just use sed
, awk
, perl
, ruby
, or whatever you're comfortable with to do the replacement.