Add character classes.
Correctly distinguish empty match from no match.