The "do shell script" command, in contrast, does come standard with
the system. It's not pure AS (it's in a scripting addition), but it
requires no additional setup work on the part of the AS programmer to
gain access to it. Now, the shell, as it happens, does regular
expression matching. So using it seemed to be an obvious solution to
the problem.