Fix invalid regular expressions
ProprietaryFixes literal regular expressions in String, Pattern and Scanner calls that java.util.regex.Pattern cannot compile when the intent is clear: replaceAll of one metacharacter such as "?" becomes replace, split on one escapes it, and a { that starts no quantifier is escaped with its }. Other patterns that do not compile, non-Java source, test sources and methods that name PatternSyntaxException are left alone.
io. moderne. staticanalysis. FixInvalidRegularExpressionsmod run . --recipe= io. moderne. staticanalysis. FixInvalidRegularExpressionsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.