Details

Description

String.replaceAll(String, Closure) is passing the stringified closure result directly to Matcher.appendReplacement.

The consequence is that the resulting string is interpreted as a "replacement string" which treats '$' and '\' specially so that group replacements can be done. For my purposes that definitely undesireable.

The whole reason I see for the closure API is so that those substitutions are done in the closure and that the closure expects it's result string to be substituted literally.