Since it is obvious that you want to remove all words containing a number, because it is mm
not used in your example either as it is prefixed with a number.
val s = "That 22m, which is gr8."
s.split(" ").filterNot(_.exists(_.isDigit)).mkString(" ")
res8: String = That which is
source
to share