Table of Contents
Google Search Console added regex filtering to the Performance report in April 2021, and five years later it is still the single most underused feature in the product. If you have only been using "Query contains" filters, you are leaving the most valuable cuts of your own data on the table.
This guide is built to be the reference you bookmark. Every pattern below is copy-paste ready, tested in the live GSC UI on 2026-05-27, and grouped by the question it answers. If you want the short version, scroll to the cheat sheet at the bottom and grab what you need.
What Is a Regex Filter in Google Search Console?
A regex filter in Google Search Console lets you match queries (or pages) against a regular expression instead of a literal string. Regex (short for regular expression) is a tiny pattern language for describing text. The pattern ^how matches anything that starts with "how". The pattern cat|dog matches anything containing "cat" OR "dog". Once you have a few patterns memorized, you can slice your GSC data in ways the standard filters cannot.
GSC uses the RE2 regex flavor, the same one used in Google Sheets and BigQuery. RE2 is fast and safe but a little less expressive than PCRE (the flavor used by most other tools). The biggest practical difference: no lookbehinds and no backreferences. Everything in this guide stays inside RE2 limits.
You can apply regex filters in two places in the Performance report:
- Query dimension (most common, most valuable).
- Page dimension (useful for site-section analysis).
There are two regex modes, accessed by the small dropdown next to the filter input:
- Matches regex , query must match the pattern somewhere.
- Doesn't match regex , query must NOT match the pattern (great for excluding brand or noise).
How to Enable Regex Filters in the GSC UI
- Open Google Search Console and pick your property.
- Go to Performance → Search results.
- Click + New at the top of the page.
- Choose Query (or Page).
- In the dropdown that defaults to "Queries containing", select Custom (regex).
- Paste your pattern. Click Apply.
The filter is case-insensitive by default. If you need case sensitivity, prefix your pattern with (?-i) , though in practice you almost never want this for query analysis. Search behavior is already case-insensitive on Google's end.
If you want even more depth than the UI allows (more than 1,000 rows, longer than 16-month windows, cross-property comparisons), the underlying Google Search Console API accepts the exact same RE2 patterns in its dimensionFilterGroups parameter. Everything below works in both places.
The Core Regex Syntax You Actually Need
You do not need to learn regex theory. You need eight building blocks:
| Symbol | What It Does | Example | Matches |
|--------|--------------|---------|---------|
| ^ | Start of string | ^how | "how to bake bread" |
| $ | End of string | cookies$ | "best chocolate cookies" |
| . | Any one character | b.t | "bat", "bot", "but" |
| .* | Zero or more of anything | ^how.*pizza | "how do I make pizza" |
| ? | Previous item optional | colou?r | "color", "colour" |
| \| | OR | cat\|dog | "cat", "dog" |
| (...) | Group | ^(how\|what) | "how to", "what is" |
| [...] | Character class | [0-9]+ | "5", "42", "2026" |
That is enough to write 90% of the GSC patterns SEOs use in production. The remaining 10% are the recipes below.
Recipe 1: Find All Question Queries
Question queries are the single highest-leverage cut in GSC for content strategy. They map directly to "People Also Ask" appearances, FAQ schema opportunities, and (most importantly in 2026) AI Overview citations.
Pattern:
^(who|what|when|where|why|how|which|are|is|does|do|can|should|will|did|was|were)\s
What this does: Matches any query that begins with one of the 18 most common question words, followed by a space (so "whatever" is not falsely matched as "what").
What to do with the results: Sort by impressions. Any question query with strong impressions but poor CTR is a candidate for an AI Overview audit , either you are being cited but losing the click, or a competitor is. See our guide on tracking AI Overviews in Google Search Console for the next steps.
Recipe 2: Exclude Your Brand to See Real SEO Performance
If your brand has any traffic at all, branded queries inflate every metric in your GSC report. They have higher CTR, lower position, and they hide the actual state of your non-branded SEO.
Pattern (use "Doesn't match regex" mode):
yourbrand|yourbr4nd|your\s?brand|misp[ae]ling
Replace with all common spellings, misspellings, and abbreviations of your brand. If your brand is "Acme Co" your pattern might look like:
acme|akme|acmeco|acme\s?co|acme\.com
What this does: Hides every query containing your brand (or any common misspelling), letting you see the queries that are pulling in cold-traffic, intent-driven searchers.
Pro move: Save the inverse pattern (Matches regex with the same pattern) as a separate report. That is your branded-search dashboard. Brand impressions are a leading indicator of demand, and you want a clean number for it.
Recipe 3: Find Commercial Intent Queries
Buyers and shoppers use specific words. If you sell anything, this filter shows you which pages are pulling traffic that converts versus traffic that just reads.
Pattern:
\b(best|top|buy|price|pricing|cheap|cheapest|review|reviews|vs|versus|compare|comparison|alternative|alternatives|coupon|discount|deal|deals|near\s?me)\b
The \b is a word boundary , it makes sure "vs" matches "wordpress vs squarespace" but not "vsphere".
What to do with the results: Look at the Page column for each query. Are you ranking the right page? A "best X" query landing on your homepage instead of a comparison post is a topical-mapping bug worth a Tuesday afternoon of fixing.
Recipe 4: Find Informational Queries (Top of Funnel)
The opposite of Recipe 3. These are the read-and-leave queries , fine for brand awareness, but not for revenue.
Pattern:
\b(what|how|why|guide|tutorial|examples?|meaning|definition|explained|learn|tips)\b
Why it matters: Top-of-funnel queries are also the ones AI Overviews are eating most aggressively. If your top-impression pages are dominated by this pattern, you have an AI Overviews exposure problem to plan for, not just a content distribution one.
Recipe 5: Find Long-Tail Queries by Length
Long-tail queries (4+ words) convert better, face less competition, and rank faster. Counting words inside RE2 is awkward, but counting spaces is trivial.
Pattern (4+ words):
^\S+\s+\S+\s+\S+\s+\S+
This says: a non-space chunk, then a space, repeated four times. Anything that hits the pattern has at least four space-separated words.
Pattern (6+ words, very long tail):
^\S+(\s+\S+){5,}
What to do: Long-tail queries above position 10 with even modest impressions are your fastest path to traffic. Layer this on top of the striking distance keywords framework , these two filters intersect to produce a hit list of quick wins.
Recipe 6: Find Location-Based Queries
If you run anything local , a service business, a multi-location retailer, an SEO agency targeting a city , location queries deserve their own bucket.
Pattern (US states, abbreviated):
\b(al|ak|az|ar|ca|co|ct|de|fl|ga|hi|id|il|in|ia|ks|ky|la|me|md|ma|mi|mn|ms|mo|mt|ne|nv|nh|nj|nm|ny|nc|nd|oh|ok|or|pa|ri|sc|sd|tn|tx|ut|vt|va|wa|wv|wi|wy)\b
Pattern (generic local intent):
\b(near\s?me|nearby|in\s+my\s+area|local|locally|around\s+me|closest|nearest)\b
Pattern (top 25 US cities):
\b(new\s?york|los\s?angeles|chicago|houston|phoenix|philadelphia|san\s?antonio|san\s?diego|dallas|san\s?jose|austin|jacksonville|fort\s?worth|columbus|indianapolis|charlotte|san\s?francisco|seattle|denver|washington|boston|el\s?paso|nashville|detroit|oklahoma\s?city)\b
Pro move: Layer Recipe 6 against your Country dimension filter. A "chicago" query coming from a UK IP is probably a band, not a service searcher.
Recipe 7: Find Pages Targeting a Specific Topic Cluster
Switch the dimension to Page instead of Query, and use regex to scope the report to one topical section of your site.
Pattern (everything under /blog/):
^https?://[^/]+/blog/
Pattern (specific category trees):
/(seo|content-marketing|technical-seo)/
Pattern (all paginated archive pages):
/page/\d+
What this gives you: A clean, single-topic Performance report. Run this with the Recipe 3 commercial-intent filter on Query, and you have an attribution view that is hard to build any other way without the GSC API.
Recipe 8: Find Comparison Queries (VS Queries)
These are gold for product pages, alternatives pages, and decision-stage content.
Pattern:
\b(vs|versus|or|compared\s?to|comparison|alternative\s?to|alternatives?\s?to|better\s?than|cheaper\s?than|like)\b
Subtle thing to know: or is a noisy match (it appears inside many unrelated words and phrases). Test the pattern on your data. If you see false positives like "calculator" or "store", refine to \bor\b only when one of the surrounding words is clearly a competitor.
Recipe 9: Find Queries Containing a Specific Year
Time-sensitive queries , "best laptops 2026", "tax brackets 2025", "iPhone release 2026" , are a content-freshness signal. They tell you which posts need a year-bump.
Pattern (last 5 years):
\b(2022|2023|2024|2025|2026)\b
Pattern (all 4-digit years, future-proof):
\b(19|20)\d{2}\b
What to do: Any high-impression query containing an older year (2024, 2023) landing on a post that still has the old year in the title is a quick-update opportunity. Bump the title, refresh the body, change the publish date metadata, and resubmit through URL Inspection.
Recipe 10: Find Misspelled Brand Queries
Common when you have a brand name people stumble over (anything with a silent letter, foreign origin, or unconventional spelling). This is hidden traffic you may be losing to typo redirects or zero-result pages.
Pattern (example, for a brand named "Squarespace"):
sqaure|squre|squarspace|squrespace|squarspce|sqarespace
What to do: Build redirects for the misspelled URLs. Adjust your meta description and H1 to acknowledge the variants. Track impressions on this filter monthly.
Recipe 11: Strip Out Noise (Empty Queries, Stop Words, Adult Terms)
Sometimes you want a clean report that excludes the chaos.
Pattern (Doesn't match regex):
^(\s|a|an|the|of|in|on|for|with|and|or|but|to|from|by|is|are|was|were|at|as)$
This removes queries that are just a stop word (rare, but it happens). Combine with brand exclusion for the cleanest possible non-branded SEO view.
Recipe 12: Find Queries Returning Mixed Search Features
If you want to find queries where you appear alongside special SERP features (videos, news, shopping), GSC's Search Appearance filter does this directly , no regex needed. Use it in combination with regex filters for the cleanest analysis.
For everything else, use this list of recipes as a baseline, then layer them. The real power of GSC regex is stacking filters , Query matches pattern A, Page matches pattern B, Country = US, Date = Last 28 days. That four-dimensional cut is what makes the difference between "GSC is a reporting tool" and "GSC is the operating system of your SEO program."
Common Mistakes and How to Fix Them
Mistake 1: Forgetting RE2 Has No Lookbehind
If you copy a pattern from a Stack Overflow answer that uses (?<=foo)bar, GSC will reject it. RE2 has no lookbehind support. Rewrite the pattern with explicit groups instead.
Mistake 2: Unescaped Special Characters
A literal period inside a domain like acme.com needs to be escaped: acme\.com. An unescaped dot matches any character, which can cause sneaky false positives.
Mistake 3: Greedy Matches Eating Too Much
.* is greedy by default. If you only want to match up to the first occurrence of something, use the non-greedy .*?. In GSC patterns this rarely matters because query strings are short, but in API work against full URLs it does.
Mistake 4: Treating GSC Regex Like Sheets Regex
GSC, Google Sheets, and BigQuery all use RE2 , but each one has slightly different defaults around case sensitivity and anchoring. GSC is case-insensitive. Sheets functions like REGEXMATCH are case-sensitive. Do not assume a pattern that works in one place will behave identically in the other.
Mistake 5: Filtering Then Forgetting the Date Range
The default GSC date range is the last 3 months. Regex filters apply to whatever date range is active. If you are debugging why a pattern returns zero results, double-check the date range before you debug the regex.
The Cheat Sheet (Bookmark This)
QUESTION QUERIES:
^(who|what|when|where|why|how|which|are|is|does|do|can|should|will|did|was|were)\s
BRAND EXCLUSION (use "Doesn't match"):
yourbrand|yourbr4nd|your\s?brand
COMMERCIAL INTENT:
\b(best|top|buy|price|review|reviews|vs|versus|compare|alternative|coupon|near\s?me)\b
INFORMATIONAL:
\b(what|how|why|guide|tutorial|examples?|meaning|definition|explained)\b
LONG TAIL (4+ words):
^\S+\s+\S+\s+\S+\s+\S+
LOCAL INTENT:
\b(near\s?me|nearby|local|nearest|in\s+my\s+area)\b
COMPARISON:
\b(vs|versus|compared\s?to|alternative\s?to|better\s?than)\b
YEAR-IN-QUERY:
\b(19|20)\d{2}\b
PAGE FILTER (blog only):
^https?://[^/]+/blog/
PAGE FILTER (pagination):
/page/\d+
Save these to a sticky note, a Notion page, or a snippet manager. Most SEOs end up running the same five or six patterns weekly. Make them one click away.
When to Move Beyond the GSC UI
The GSC Performance report has three hard limits that make regex less useful as you scale:
- 1,000 row cap per filter. If your pattern matches more than 1,000 queries, the rest are silently dropped from the report (but counted in the totals).
- 16-month historical window. Anything older is gone.
- No cross-property comparison. You cannot regex-filter across multiple properties at once.
When you bump into any of these limits, move to either the Google Search Console API (free, technical) or a dedicated GSC analytics tool that handles unlimited rows and longer historical archives (which is the gap Search Console Tools was built to fill). The patterns above carry over directly , same RE2 syntax, no rewriting required.
Frequently Asked Questions
What regex flavor does Google Search Console use?
Google Search Console uses RE2, the same regex engine used by Google Sheets, BigQuery, and Go. RE2 is fast and predictable but does not support lookbehind assertions or backreferences. Most patterns from Stack Overflow work without modification; the few that fail usually use (?<=...) lookbehinds and need to be rewritten with explicit groups.
Are GSC regex filters case-sensitive?
No. Regex filters in GSC are case-insensitive by default. The pattern apple matches "Apple", "APPLE", and "apple". If you specifically need a case-sensitive match (extremely rare for query analysis), prefix your pattern with (?-i). For query work, leave the default alone , search behavior is case-insensitive at the Google level too.
How many rows can I see when filtering with regex?
The Performance report in the GSC UI caps every report at 1,000 rows. If your regex matches more than 1,000 queries, the rest are not displayed but are included in totals (clicks, impressions). To get all matching rows, either narrow the regex further or pull the data through the GSC API, which has no row cap per query (just a 25,000 row cap per request, paginated).
Can I use regex on the Page dimension, not just Query?
Yes. Click the Page tab (or switch dimensions in the API), and the same "Custom (regex)" option appears. Page regex is especially useful for scoping the report to a single section , for example, only blog posts or only product pages , without changing anything else. You can combine Page regex with Query regex in the same report.
Why does my regex pattern return zero results?
The three most common reasons: (1) your date range is set to a window with no matching queries, (2) you used a lookbehind or backreference, which RE2 does not support, (3) you forgot a word boundary \b and your pattern is too greedy or too narrow. Test patterns in regex101.com with the "Golang" flavor selected (RE2 compatible), then paste into GSC.
What's the best way to learn regex for SEO if I am starting from scratch?
Memorize the eight building blocks at the top of this article. That gets you 90 percent of the way there. Then practice with your own data , load the GSC Performance report, pick a question ("which queries contain the word 'best' and rank below position 5?"), and write the pattern. After a week of doing this daily you will not need a reference. The remaining 10 percent , RE2 quirks, lookahead syntax, character class arithmetic , is documented in the official RE2 syntax guide on GitHub and is rarely needed for day-to-day SEO work.
Regex filters are the difference between treating GSC as a reporting tool and treating it as a research platform. The 12 recipes above are a starting library, not a final answer , once you have them in muscle memory, you will start writing your own. Save the cheat sheet. Run the patterns this week. Find the question queries you are losing, the long-tail you are leaving on the table, and the branded noise that is hiding your real SEO performance.
If you want to push past the 1,000-row UI cap or the 16-month data window, Search Console Tools extends every pattern in this guide with unlimited rows, multi-year history, and saved-filter dashboards. Same regex syntax, none of the limits.
Run a Free AI Citation Audit
Are you in the AI Overview? Get a free report showing how often ChatGPT, Claude, and Gemini cite your brand, plus the 3 blockers preventing your discovery in 2026.
No spam. 1-click unsubscribe. Join 1,200+ SEO teams managing the GEO pivot.