fork(4) download
  1. import java.util.*
  2.  
  3. fun main(args: Array<String>) {
  4. val myText = "This is. a text ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ,,1234"
  5. print(myText.replace("""[\p{N}\p{P}\p{S}&&[^\p{So}]]+""".toRegex(), ""))
  6.  
  7. }
Success #stdin #stdout 0.09s 34700KB
stdin
Standard input is empty
stdout
This is a text ๐Ÿ‘จ‍๐Ÿ‘ฉ‍๐Ÿ‘ง‍๐Ÿ‘ฆ