STS = String newStr; STS = newStr.replaceAll ( " // " , " \\\\\\\\ " ) ;; // two slashes in the string is a \ slash