Since you're using IC613 (from your previous post), you could use the newer "pcre" (Perl Compatible Regular Expression) functions which are more powerful than the older "rex" functions. For example:
string=pcreReplace(pat string "" 0)
The \\s (extra escape needed because the pattern really needs a backslash, but backslash is used in SKILL, so needs to be escaped) means whitespace. So it will match space, tab, etc.
You could also use the older functions:
string=rexReplace(string "" 0)
The PCRE-based functions are really powerful, and so I'd recommend those in general if you don't need to make code also work in IC5141 (which only had the older rex functions)