The Search Console Performance report holds some of the most valuable SEO data you will ever get for free: the real queries people typed before they saw your pages. The problem is volume. A site of any size has thousands of queries and pages, and the standard "contains" filter only lets you look for one string at a time.
Regular expressions (regex) fix that. With one filter you can isolate every question-style query, separate branded from non-branded searches, group all pages in a folder, or find long-tail queries of six words or more. This guide explains how regex works in Search Console, the syntax rules you need, and a library of patterns you can copy today.
If you are new to the report itself, read our Search Console Performance report guide first, or our broader overview of everything about Google Search Console.
Key Takeaways
- Search Console regex filters are available for queries and pages in the Performance report, under Custom (regex).
- Search Console uses RE2 syntax, which does not support lookaheads, lookbehinds or backreferences.
- Matching is partial by default and not case-sensitive; use ^ and $ to anchor, and (?-i) for case sensitivity.
- Use "Doesn't match regex" to exclude terms, for example to see non-branded queries only.
- Combine regex filters with the comparison feature and exports to analyse trends at scale.
How to use a regex filter in Search Console
- Open Performance → Search results for your property.
- Click Add filter (or the filter icon) and choose Query or Page.
- Open the filter type dropdown and select Custom (regex).
- Choose Matches regex or Doesn't match regex.
- Enter your pattern and apply. Check a few rows in the table to confirm it is catching what you expect.
- Optionally add a date comparison or a second filter (for example, country or device) to narrow further.
The rules that matter: RE2 in Search Console
Google's help documentation on advanced filtering in the Performance report is clear about the flavour of regex used:
“The RE2 syntax is used.”
— Search Console Help, Performance report: Advanced filtering and comparison
RE2 is fast and safe, but it is not identical to the regex you might know from JavaScript or PCRE. The RE2 syntax reference marks lookaheads such as (?=re) and (?!re), lookbehinds and backreferences such as \1 as not supported. Two more behaviours from Google's documentation:
- Partial match by default. A pattern matches anywhere in the string unless you anchor it with
^(start) or$(end). - Not case-sensitive by default. Add
(?-i)at the start to make matching case-sensitive.
| Symbol | Meaning | Example | Matches |
|---|---|---|---|
| | OR | price|cost|fee | Any query containing price, cost or fee |
^ | Starts with | ^how | "how to…" but not "know how" |
$ | Ends with | near me$ | Queries ending in "near me" |
. | Any single character | colou.r | Rarely needed; escape dots in URLs with \. |
.* | Any characters, any length | best.*for | "best crm for small business" |
[ ] | Any one of these characters | c[aie]t | cat, cit, cet |
( ) | Group | (buy|order) online | "buy online", "order online" |
\d | A digit | 20\d\d | Years like 2025, 2026 |
\s | A space | \s | Used to count words |
{n,} | n or more repetitions | (\S+\s){5,} | Six or more words |
Copy-and-paste regex patterns for SEO
| Goal | Filter | Pattern |
|---|---|---|
| Question queries | Query, matches | ^(who|what|when|where|why|how|which|can|does|is|are|should)\b |
| Non-branded queries | Query, doesn't match | acme|acme\s?co|akme (your brand and misspellings) |
| Commercial intent | Query, matches | best|top|vs|review|compare|alternative|price|cost |
| Local intent | Query, matches | near me|nearby|in (london|manchester|leeds) |
| Long-tail queries (6+ words) | Query, matches | ^(\S+\s){5,}\S+$ |
| Pages in a folder | Page, matches | /blog/ |
| Several folders at once | Page, matches | /(services|locations)/ |
| URLs with parameters | Page, matches | \? |
| Exclude the homepage | Page, doesn't match | ^https://www\.example\.com/$ |
Because RE2 has no negative lookahead, you cannot write "contains X but not Y" in one pattern. Instead, stack two filters: one "Matches regex" and one "Doesn't match regex".
Practical workflows
1. Find content ideas from question queries
Filter queries with the question pattern, sort by impressions and look for questions where your average position is beyond the first page. Those are prime candidates for new sections or FAQs. Our guide to search queries vs keywords explains how to group them into topics.
2. Track branded vs non-branded performance
Create two views: brand terms matching, and brand terms not matching. Non-branded clicks show how well your SEO wins new audiences; branded clicks reflect demand created elsewhere. See branded vs non-branded keywords for how to report each, and share of search for a competitive view of brand demand.
3. Diagnose a traffic drop by section
Use page filters for each folder and the date comparison to see which section lost clicks. Then check the queries for that section. This is often the fastest first step in ranking drop recovery.
4. Find long-tail and AI-style queries
Very long, conversational queries have become more common as people get used to AI search. The six-plus-word pattern surfaces them so you can see which of your pages answer detailed questions. Pair this with data from our guide to seeing organic keywords in GA4.
Build a reusable pattern library
The real time saving comes from not rewriting patterns every month. Keep a simple shared document or spreadsheet with each pattern, what it is for and when it was last checked. Brand patterns in particular need regular updates as new product names, misspellings and abbreviations appear in your query data.
- Name each pattern by purpose, such as "Non-brand", "Questions", "Local intent" or "Service pages".
- Record the dimension (query or page) and whether it is a match or a doesn't-match filter.
- Bookmark filtered views. Search Console keeps filters in the report URL, so saving the link reopens the same view.
- Reuse patterns in dashboards. The same RE2 expressions work in many reporting tools, so you can carry them into an SEO reporting dashboard for consistent monthly numbers.
Common mistakes with Search Console regex
- Using lookaheads. Patterns copied from other tools with
(?!...)will fail; use a "Doesn't match" filter instead. - Forgetting partial matching.
seoalso matches "seoul" and "seo-friendly". Add word boundaries (\bseo\b) or anchors. - Not escaping special characters. In URLs,
.and?have special meanings; escape them with a backslash. - Trailing pipes. A pattern like
price|cost|matches everything because the empty option matches any string. - Trusting totals blindly. Search Console omits some anonymised queries, so query-filtered totals can be lower than the unfiltered chart.
- Forgetting the export. For deeper analysis, export the filtered table or use the API and build a dashboard.
Related Guides
- How to See Organic Search Keywords in GA4
- LinkedIn Analytics: Which Metrics to Track and Why
- Google Analytics Alternatives: Privacy-Friendly Options Compared
- Branded vs Non-Branded Keywords: How to Balance Both
Frequently Asked Questions
Which regex syntax does Google Search Console use?
Search Console uses RE2 syntax, according to Google's help documentation. RE2 does not support lookaheads, lookbehinds or backreferences.
Is Search Console regex case-sensitive?
No. Matching is not case-sensitive by default. Add (?-i) at the start of the pattern to make it case-sensitive.
How do I exclude branded queries in Search Console?
Add a Query filter, choose Custom (regex), select Doesn't match regex and enter your brand name and common misspellings separated by pipes.
Can I use regex for pages as well as queries?
Yes. Regex filters work for the Page dimension too, which is useful for grouping folders, templates or URLs with parameters.
Why does my regex filter show no results?
Common causes are unsupported syntax such as lookaheads, unescaped special characters, or anchors that are too strict. Test the pattern in an RE2-compatible tester.
Conclusion
A handful of regex patterns turns Search Console into a fast research and diagnostics tool. Learn the RE2 basics, save the patterns that fit your site and build them into your monthly reporting. If you would like experts to turn that data into rankings and leads, see our SEO services or get a quote.




