ctype_compatibility.py: Use a different regexp to match the character classes

Suggestion by Alexandre Oliva. Slightly slower. Doesn’t look more
readable to me.