Added support for the regular expression string. There are still some things that need sorting out.