fork(1) download
  1. object Main extends App {
  2. val s = "ABCD A M@L 79\nBGDA F D@L 89"
  3. val reg = """[\t\p{Zs}]+"""
  4. val cleanedRDD2 = s.replaceAll(reg, ",")
  5. print(cleanedRDD2)
  6. }
Success #stdin #stdout 0.41s 322496KB
stdin
Standard input is empty
stdout
ABCD,A,M@L,79
BGDA,F,D@L,89