Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Regex patterns should not be created needlessly #30
Moreover they are the only mechanism available to create instances of the Pattern class, which are necessary to do any pattern matching using regular expressions. Unfortunately that can be hidden behind convenience methods like
It is therefore somewhat easy to inadvertently repeatedly compile the same regular expression at great performance cost with no valid reason.