First version of dictionary lookup with regular expressions and errors.