include::../description.adoc[]
To match a literal string, rather than a regular expression, either all special characters should be escaped or the ``++Pattern.LITERAL++`` flag or methods that don't use regular expressions should be used.
== Noncompliant Code Example
----
Pattern.compile("([");
str.matches("([");
str.replaceAll("([", "{");
str.matches("(\\w+-(\\d+)");
== Compliant Solution
Pattern.compile("\\(\\[");
Pattern.compile("([", Pattern.LITERAL);
str.equals("([");
str.replace("([", "{");
str.matches("(\\w+)-(\\d+)");