A PatternSyntaxException is an unchecked exception thrown to indicate a syntax error in a regular-expression pattern.