If you have working solution, you can combine all of those into single formula by chaining those expressions.
Substitute(Regex(Substitute(str, "!", "")," ", "", GLOBALREPLACE), "123", "");
or using variables
str1 = Substitute(str, "!", "");
str1 = Regex(str1, " ", "", GLOBALREPLACE);
Substitute(str1, "123", "");
I also attached data table with the formulas
-Jarmo