Updated regular expression pattern for matching query strings
Updated regular expression with negative sign