Add tests for regexp variables in query strings
Fix how regular expression gets built for query string so that order of parameters is always preserved