Improved compatability with mawk

Character classes are not available in mawk, replaced them with a more
simple character sets.