Hey Folks,
I feel like I’ve asked this before, but I can’t find the post – nor can I find the answer in my library. If I have, and you know where – please point me to it.
The Satimage.osax can easily replace a literal list of strings with a list of strings.
set dataStr to "Now is the time for all good men to come to the aid of their country."
set newStr to change {"Now", "is", " the ", "men"} into {"NOW", "is a REALLY good", " ", "people"} in dataStr
--> "NOW is a REALLY good time for all good people to come to aid of their country."
I was thinking that AppleScriptObjC could also.
Or does it need to loop through using the stringByReplacingOccurrencesOfString
method?
The Satimage.osax can also do this with case-sensitive on/off and can manage multiple regex patterns at once.
TIA.
-Chris