Support categories (like '\w') in regular expressions.

Fixes #3