grails/grails-core — comment on commit 13e5bfad045c9d2e228ab2b7e6894d3f29d5fa1e
File: grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/GrailsResourceUtils.java line 63
By lhotari:

Couldn't you use [Pattern.quote](http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#quote(java.lang.String\)) (since Java 1.5) for escaping?
for example in groovy console:

import java.util.regex.Pattern

'a\\b\\c'.replaceAll(Pattern.compile(Pattern.quote('\\')),'-')

returns a-b-c