I want to remove any invisible chars from a string, only keep spaces & any chars from 0x20-0x7F,
I use this: Regex.Replace(QueryString, @"[^\s\x20-\x7F]", "");
However it does not work
QueryString
has a char 0xA0, after that, the char still exists in QueryString
.
I am not sure why this failed to work?