human
Replace non-ASCII characters with a single space
assistant
Here is some code to replace non-ASCII characters in string `text` with a single space

re.sub('[^\\x00-\\x7F]+', ' ', text)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.