remove spaces causing some regexes to fail