gabrielfv
04/22/2020, 6:23 PMval url = "<https://google.com/>"
val rgxReplace = url.replace("/".toRegex(), "\\/")
val strReplace = url.replace("/", "\\/")
println(rgxReplace) // outputs: <https://google.com/>
println(strReplace) // outputs: https:\/\/google.com\/gabrielfv
04/22/2020, 6:24 PM"\\\\/" to get a similar resultgabrielfv
04/22/2020, 6:27 PMgabrielfv
04/22/2020, 6:28 PM/ character in Gson serialization. My backend needs that, although I'm slightly concerned about possible side effects like breaking Base64.Volodymyr Galandzij
04/23/2020, 6:47 AMurl.replace("/".toRegex(), """\\/""")