Ahh, so the Regexp class _does_ have an escape method. I looked for it but missed it. I still like your version better. And you caught the greedy wildcard, too.