replace posix character classes with ranges