Implemented regular expression matcher
Improved error reporting