cache the regex tests