I have tried to fix this for a long time, and i just can\'t do it.
It could be any string, but this is an example:
\"\\This string \\contains some\\ bac
Try This
val s = """\This string \contains some\ backslashes\""" s.replaceAll("""\\""","""\\\\""")