Regular expression to match any ASCII character
The following regular expression
will match any ASCII
character (character values [0-127]
).
[\x00-\x7F]
The next regular expression
makes the exact opposite match, it will match any character that is NOT ASCII
(character values greater than 127
).
[^\x00-\x7F]