regex to match non-latin char with ASCII 0-31 and 128-255
问题 wanted to match the non-latin char. tried it. as per my understanding if (a.matches("[\\x8A-\\xFF]+")) should return true but its false. String a = "Ž"; if (a.matches("[\\x8A-\\xFF]+")) { } 回答1: Judging from your title: Regex to match non-latin char with ASCII 0-31 and 128-255 it seems you're after all characters except those in range 32-127 and you're surprised Ž doesn't match. If this is correct, I suggest you use the expression [^\x20-\x7F] ( "all characters except those in range 32-127" )