Initial implementation of handling Regexp in query