Added regex instance caching to resolver