xcell67, it looks as if spaces are literally being replaced by the regular expression itself!
If you are using PHP, please post the exact preg_replace() code that you are using including the regular expression and replacement in that code.
If you are using EditPad, select the regular expressions option in the search box and use the regex
([ ]{2,}|[\n\r\f\t]+) with the replace
{literal}\1{/literal}