Continuing the discussion from RegexAndStuffLib Script Library:
@ShaneStanley, I love your Regex Lib and it always works great from SD7.
But I’m getting this error running my complex scripts and your simple example script from FastScripts:
Error Number: -1708
NSRegularExpression doesn’t understand the “regularExpressionWithPattern_options_error_” message.
I get the same error running from Keyboard Maestro.
Running Fastscripts 2.7.8 (817) on macOS 10.14.5 (Mojave).
The first few times I ran the script worked fine. Then, for no apparent reason, it starting throwing this error. Same with my complex script.
Here’s the script:
use AppleScript version "2.5" use framework "Foundation" use framework "AppKit" -- this may not be required use scripting additions use script "RegexAndStuffLib" version "1.0.3" set newStr to regex change "one two three" search pattern "t(.?)" replace template "t**$1**" set currentApp to path to frontmost application as text tell application currentApp set msgStr to newStr set msgTitleStr to "Test RegexAndStuff Lib" display dialog msgStr with title msgTitleStr end tell --> "one t**w**o t**h**ree" return newStr