(PDB-950) Moved regexp query validation to existing v3 and v4 query validators. Added a PostgreSQL exception handler that returns 4xx error code when the DB returns 'invalid_regexp' exception. Fixed tests