Fix incorrect regex that didn't accept byte values a-f.

Also add slicker support for multibyte characters like \ud834dd1e.
Old implementation would have required user to enter \ud834\udd1e which
is not intuitive.