Very late to the party, but this regexp works: /[ -~]/
.
How? It matches all characters in the range from space (ASCII DEC
32) to tilde (ASCII DEC
126), which is the range of all printable characters.
If you want to strip non-ASCII characters, you could use something like:
$someString.replace(/[^ -~]/g, '');
NOTE: this is not valid .net
code, but an example of regexp usage for those who stumble upon this via search engines later.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…