Free SEO audit for new clients — claim yours
Home/Blog/Analytics/Using Regex in Search Console: Filters That Save…
Analytics

Using Regex in Search Console: Filters That Save Hours

Using Regex in Search Console: Filters That Save Hours
Table of contents
  1. Key Takeaways
  2. How to use a regex filter in Search Console
  3. The rules that matter: RE2 in Search Console
  4. Copy-and-paste regex patterns for SEO
  5. Practical workflows
    1. 1. Find content ideas from question queries
    2. 2. Track branded vs non-branded performance
    3. 3. Diagnose a traffic drop by section
    4. 4. Find long-tail and AI-style queries
  6. Build a reusable pattern library
  7. Common mistakes with Search Console regex
  8. Related Guides
  9. Frequently Asked Questions
    1. Which regex syntax does Google Search Console use?
    2. Is Search Console regex case-sensitive?
    3. How do I exclude branded queries in Search Console?
    4. Can I use regex for pages as well as queries?
    5. Why does my regex filter show no results?
  10. Conclusion
  11. References

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

  1. Open Performance → Search results for your property.
  2. Click Add filter (or the filter icon) and choose Query or Page.
  3. Open the filter type dropdown and select Custom (regex).
  4. Choose Matches regex or Doesn't match regex.
  5. Enter your pattern and apply. Check a few rows in the table to confirm it is catching what you expect.
  6. 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.
SymbolMeaningExampleMatches
|ORprice|cost|feeAny query containing price, cost or fee
^Starts with^how"how to…" but not "know how"
$Ends withnear me$Queries ending in "near me"
.Any single charactercolou.rRarely needed; escape dots in URLs with \.
.*Any characters, any lengthbest.*for"best crm for small business"
[ ]Any one of these charactersc[aie]tcat, cit, cet
( )Group(buy|order) online"buy online", "order online"
\dA digit20\d\dYears like 2025, 2026
\sA space\sUsed to count words
{n,}n or more repetitions(\S+\s){5,}Six or more words

Copy-and-paste regex patterns for SEO

GoalFilterPattern
Question queriesQuery, matches^(who|what|when|where|why|how|which|can|does|is|are|should)\b
Non-branded queriesQuery, doesn't matchacme|acme\s?co|akme (your brand and misspellings)
Commercial intentQuery, matchesbest|top|vs|review|compare|alternative|price|cost
Local intentQuery, matchesnear me|nearby|in (london|manchester|leeds)
Long-tail queries (6+ words)Query, matches^(\S+\s){5,}\S+$
Pages in a folderPage, matches/blog/
Several folders at oncePage, matches/(services|locations)/
URLs with parametersPage, matches\?
Exclude the homepagePage, 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. seo also 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.

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.

References

  1. Search Console Help: Performance report advanced filtering and comparison
  2. Google RE2: Syntax reference
  3. Search Console Help: Performance report overview
  4. Search Console Help: Export Search Console data using the API
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

How to See Organic Search Keywords in GA4
Analytics

How to See Organic Search Keywords in GA4

Why organic keywords are missing from GA4, how to link Search Console to see them, where to find the reports, and how to work around the data's limits.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote