I have a string that can contain, between characters (other than spaces), one or more spaces.
I would like to replace an undetermined number of spaces by only one space.
Example:
3 root hadoop 332 2020-03-11 10:09
Becomes:
3 root hadoop 332 2020-03-11 10:09
or
3 root hadoop 332 2020-03-11 10:09
becomes:
3 root hadoop 332 2020-03-11 10:09
How can I achieve this ?