The ``++java.util.regex.Pattern.compile()++`` methods have a significant performance cost, and therefore should be used sensibly.
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 ``++String.matches()++`` or ``++String.split()++``.
It is therefore somewhat easy to inadvertently repeatedly compile the same regular expression at great performance cost with no valid reason.
This rule raises an issue when:
* A ``++Pattern++`` is compiled from a ``++String++`` literal or constant and is not stored in a static final reference.
* ``++String.matches++``, ``++String.split++``, ``++String.replaceAll++`` or ``++String.replaceFirst++`` are invoked with a ``++String++`` literal or constant. In which case the code should be refactored to use a ``++java.util.regex.Pattern++`` while respecting the previous rule.