I'm searching for a regular expression that let me replace all chars but letters and digits and one whitespace consecutively.
For example:
string = "a b c e f g 1 2 3 !"
should be replaced in ruby to "a b c e f g 1 2 3 "
matching letters and digits is not that problem with [a-zA-Z0-9] with the list operator. but how to combine the interval operator for " "{2,} with the list operator, since intervals seem they can't be used in list operators? Or is there another approach.