Why is this an issue?
In regular expressions the boundaries
\A can only match at the beginning of the input (or, in case of
^ in combination with the
MULTILINE flag, the beginning of the line) and
only at the end.
These patterns can be misused, by accidentally switching
$ for example, to create a pattern that can never
Noncompliant code example
// This can never match because $ and ^ have been switched around
Pattern.compile("$[a-z]+^"); // Noncompliant