[Solved] Scala: How to replace all consecutive underscore with a single space?
[ad_1] You could use replaceAll to do the job without regex : val name: String = “cust_id” val newName: String = name.replaceAll(“_”,” “) println(newName) [ad_2] solved Scala: How to replace all consecutive underscore with a single space?