I'm writing a .NET regular expression that needs to match all ASCII and extended ASCII characters except for control characters.
To do this, I consulted the ASCII table and it seems that all these characters have an ASCII encoding of x20 to xFF.
So I suppose
[\x20-\xFF]
should be able to match all the characters that I need. However, in reality, some characters can be matched, while others cannot. For example, if you test with the online tool http://regexhero.net/tester/, or write a simple C# program, you will find that some characters such as "ç" (xE7) can be matched, but some characters such as "œ" (x9C) cannot.
Does anyone have any idea why the regex does not work?
œ
symbol from the questuin and check it via(int) 'œ
it shows339 (0x153)
which is outside the range. – Marzipan