KotlinLeaner
08/03/2022, 3:15 PMval string = "Welcome<br>how are you?"
when I am trying to regex
string?.replace("\\<.*?\\>", " ");
it's not working. It returning same string. Anyone know how to fix this problem?Chrimaeon
08/03/2022, 3:30 PMtoRegex()
string.replace("\\<.*?\\>".toRegex(), " ")
your implementation is just a string replacement."""
multiline string. you can omit the escape characters.
string.replace("""<.*?>""".toRegex(), " ")
KotlinLeaner
08/03/2022, 3:34 PMRobert Williams
08/03/2022, 4:56 PM