added caching to the regex field