I meant to say fooxscale, but had a typo. Turned out to be interesting after all.
According to their AI:
"The optimum Python regular expression to match the words foo, fooxcale, and fooyscale as whole words is \bfoo(?:x|y)?cale\b|\bfoo\b"
That actually matches foocale (wrong), foo, fooxcale and fooycale (wrong), and doesn't match fooyscale as requested.
I have to give them credit though: their AI did give me good advice the other day about an SQLite GLOB query that was not using an index in my program but did use it when I typed the query in by hand. I worked on it for about 30 minutes, then asked. Turns out that if you use a ? parameter for GLOB, SQLite can't tell whether it starts with a wildcard or not, so never uses the index. To make it use the index, you have to string splice the parameter value (after SQL quoting of course) rather that use the ? for parameter substitution. I was pretty amazed it answered that exactly right and gave me the hint about doing the splice, and warning about injection attacks.
I also think it'd be a good idea if SQLite did this test inside the VM program it generates rather than at compile time, generating code to both use the index and not use it and choosing based on the runtime test of the first character. It confused me severely.