Fix invalid regular expressions

Proprietary

Fixes 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.FixInvalidRegularExpressions
mod run . --recipe=io.moderne.staticanalysis.FixInvalidRegularExpressions

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.