This regular expression is supposed to match all non-ASCII characters, 0-128 code points:
/[^x00-x7F]/i
Imagine I want to test (just out of curiosity) this regular expression with all Unicode characters, 0-1114111 code points.
Generating this range maybe simple with range(0, 1114111)
. Then I should covert each decimal number to hexadecimal with dechex()
function.
After that, how can i convert the hexadecimal number to the actual character? And how can exclude characters already in ASCII scheme?