There is no function that will search for 0 or more instances so [ ]{1,} will only find 1 or more spaces. See http://www.gmayor.com/replace_using_wildcards.htm