Initial work on a regex implementation.