use POSIX character classes where possible