public static String escapeStringForJsRegexp ( String input ) { JsString string = uncheckedCast ( input ) ; return string . replace ( ESCAPE_JS_STRING_REGEXP , "\\$&" ) ; }
Escape a String to be used in a JsRegexp as a String literal