Add test for Qid
Fix regex for Qid