use case | regex pattern | pattern explanation | example query/url | GSC application | expected outcome |
Filter Branded Terms | brandname|brand name | Finds any query containing the word “brandname” or "brand name" | brandname reviews, buy brand name | Query Filter (use "Matches regex") | Isolates all brand-related search terms |
Exclude Branded Terms | brandname|brand name | Excludes queries containing the word “brandname” or "brand name" | compare products, top laptops | Query Filter (use “Doesn’t match regex”) | Excludes brand-related queries |
Exact Brand Terms Only | ^(brandname|brand name)$ | Only queries that are exactly “brandname” or "brand name" | brandname, brand name | Query Filter (use "Matches regex") | Isolates all exact brand searches |
Match Exact Phrase Only | ^exact phrase$ | Matches only the specified exact phrase | laptops | Query Filter (use "Matches regex") | Filters data by exact phrase match |
Match Multiple Exact Phrases | ^(exact phrase|another exact phrase|one more exact phrase)$ | Matches only the specified exact phrases | laptops, lap-tops, lap tops | Query Filter (use "Matches regex") | Filters data by exact phrases |
Identify Long Queries by Characters | .{20,} | Matches queries with 20 or more characters | where to buy high-quality laptops | Query Filter (use "Matches regex") | Segments longer queries, often more specific |
Identify Long Queries by Words | (\w+\s){3,} | Matches queries with 4 or more words | find best travel laptop under budget | Query Filter (use "Matches regex") | Isolates long-tail, multi-word queries |
Filter by Specific Path | /products/.* | Matches URLs in the /products/ directory | /products/item123 | Page Filter | Isolates traffic to a specific site section |
Match Secure URLs (HTTPS) | https:// | Matches URLs that start with HTTPS | https://example.com/page | Page Filter | Focuses on secure (HTTPS) URLs |
Exclude URLs Ending with Slash | ^.*[^\/]$ | Finds URLs that don’t end with a trailing slash | https://example.com/product | Page Filter | Focuses on URLs without trailing slashes |
Filter Local Searches | ^(near me|in\s+\w+) | Captures queries starting with "near me" or "in [location] | dentist near me, car rentals in London | Query Filter (use "Matches regex") | Isolate queries indicating local search intent |
Isolate Numeric Queries | ^[0-9]+$ | Matches queries containing only numeric characters (useful for filtering out year, model, or code searches) | 2024, 12345 | Query Filter (use "Matches regex") | Isolates numeric-only queries, allowing for focused analysis on searches that contain only numbers. |