https://en.wikipedia.org/wiki/ASCII#Printable_characters
Codes 20 to 7E, known as the printable characters, represent letters, digits, punctuation marks, and a few miscellaneous symbols. There are 95 printable characters in total.
Code 20, the "space" character, denotes the space between words, as produced by the space bar of a keyboard. Since the space character is considered an invisible graphic (rather than a control character) it is listed in the table below instead of in the previous section.
Code 7F corresponds to the non-printable "delete" (DEL) control character and is therefore omitted from this chart; it is covered in the previous section's chart. Earlier versions of ASCII used the up arrow instead of the caret (5E) and the left arrow instead of the underscore (5F).
> nonPrintable = /[^ -~]/g;
/[^ -~]/g
> 'hello world 你好 ! '.replace(nonPrintable, ' ')
'hello world ! '
> nonPrintable2 = /[^\x20-\x7E]/g;
/[^\x20-\x7E]/g
> 'hello world 你好 ! '.replace(nonPrintable2, ' ')
'hello world ! '
>
import re
re.sub('[^ -~]', ' ', 'hello world 你好 ! ')
# 'hello world ! '
re.sub(r'[^\x20-\x7E]', ' ', 'hello world 你好 ! ')
# 'hello world ! '