Avoid recompiling regexes on each method invocation