Preconvert string regexes to regex object for better performance