test(query): improved regexp matching test