A space cleaner is a special character which removes all spaces between it and the first non space character to its left and it is represented by a '!' character. If it reaches the beginning of the string it stops.
Given a string output the string in any reasonable format after the cleaning process.
Trailing spaces at the end of the string must be still be in the output.
Remember that space cleaners remain after their job.
Input will only consist of printable ASCII characters.
This is code-golf, so least number of bytes win.
" ! a! !b c!d !" => "! a!!b c!d!" "a !" => "a!" "! a" => "! a" "! ! !" => "!!!" "! " => "! "