pub fn get_regex(pattern: &str) -> Result<Arc<Regex>, Error>
Get or compile a regex using the global cache.
Returns an error if the pattern is invalid.