I have got this simple function for reduction of more than 3 spaces to only two spaces   ConsoleWrite(ReduceSpaces(' abc def 1 2 ')& @CRLF) ConsoleWrite(ReduceSpaces('a b c d e')& @CRLF) ConsoleWrite(ReduceSpaces('abc')& @CRLF) ConsoleWrite(ReduceSpaces('')& @CRLF) ; 3 and more spaces reduces to 2 spaces Func ReduceSpaces($s)   Return StringRegExpReplace($s, "\x20{3,}", "  ") EndFunc  But I want also more general version of this function where as parameters will be number of sp