(PDB-950) Added validation for regexps in queries

This commit adds a validation for regexps in queries as was proposed in PDB-950
Thank you, I will fix this. I thought that engine.clj implements some different validation.