Using new RegExp rather then match. It solves the caching problem whilst allowing us to use a global match