Vivek model fixes 2

This branch contains a commit for querying words matching a regular expression.