Key takeaways
- Search Console regex filters use RE2 syntax and work on the Queries and Pages dimensions.
- Matching is partial and case-insensitive by default; use ^ and $ to anchor and (?-i) for case-sensitive.
- RE2 does not support lookaheads, lookbehinds or backreferences; use Doesn't match regex instead.
- Query filters drop anonymized queries from totals, so label filtered numbers clearly in reports.
Search Console regex is the fastest way to answer the questions clients actually ask: how much traffic is brand, are we showing up for questions, how is the blog doing compared with service pages. On large sites, from dealership fleets to stores with millions of products, we build these filters into every monthly report. This guide covers the syntax rules from Google's documentation, patterns you can adapt and the limits to explain to clients. It is part of the reporting we deliver through white label SEO.
What regex syntax does Search Console use?
Search Console uses RE2 syntax. In the Performance report, add a filter on Queries or Pages, choose Custom (regex), then pick Matches regex or Doesn't match regex. Matching is case-insensitive and partial by default, so a pattern can match anywhere in the string. Separate alternatives with a vertical bar and anchor with ^ and $.
All of this comes from Google's help page on advanced filtering and comparison, which also shows that prepending (?-i) makes a match case-sensitive, useful for URLs. RE2's own syntax reference marks lookahead, lookbehind and backreferences as not supported, which is why patterns copied from other tools sometimes fail.
How do you write a regex for branded queries?
List the brand name, its common misspellings, spaced and joined versions and product names that only the brand owns, separated by vertical bars. Apply it with Matches regex to see brand traffic and with Doesn't match regex for non-brand. Review the matched queries once, because short brand names often match unrelated words.
A hypothetical example for a brand called Brandname: brand ?name|brnadname|brandnme|brandname\.com. Search Console also offers a branded queries filter, but Google's page on dimensions and data groupings says it is not available for sites with a low number of impressions and that some queries may be classified incorrectly. A regex you control is the fallback and the way to check the automatic split.
Which Search Console regex examples are most useful?
Four patterns cover most agency reports: question queries, long-tail queries by word count, brand versus non-brand, and page groups by folder. Each is a starting point; adjust words, folders and thresholds to the client's site. The examples below are illustrative and should be tested on the client's data before going into a report.
| Goal | Dimension | Example pattern |
|---|---|---|
| Questions | Queries | ^(who|what|when|where|why|how|which|can|does|is|are|should)\\b |
| Queries of seven or more words | Queries | ^(\\S+\\s){{6,}}\\S+$ |
| Local intent | Queries | near me|open now|\\bin [a-z]+$ |
| Blog folder only | Pages | /blog/ |
| Service pages, case-sensitive | Pages | (?-i)/services/[a-z-]+/$ |
| Exclude parameters | Pages (Doesn't match) | \\? |
The question pattern uses \b, a word boundary that RE2 supports for ASCII words, so "how" does not match "however". For non-English clients, test it, because RE2's word boundary is ASCII only.
How do you exclude queries without lookaheads?
Use the Doesn't match regex option instead of a negative lookahead. To see non-brand questions, add two filters: Queries matches the question pattern, and Queries doesn't match the brand pattern. Search Console combines filters across dimensions too, so you can add a Pages filter for one folder in the same view.
What are the limits of regex filters in Search Console?
Filtering by query or URL can change report totals because of data truncation and anonymized queries, which Google leaves out of tables to protect privacy. Only one comparison runs at a time. The interface shows a limited set of rows, so very large sites need the API or bulk export for complete query lists.
Google's page on dimensions and data groupings says anonymized queries are included in chart totals unless a query filter is applied, and that the bulk data export is the most complete query list. Our Search Console bulk data export guide explains how to set that up; in BigQuery, the same RE2 patterns work with REGEXP_CONTAINS. Google's bulk export overview has the setup details.
How should agencies use regex filters in client reports?
Save each pattern in a shared document per client, name it, date it and note who approved the brand list. Use the same patterns every month so trends are comparable. In the report, say which filter produced each number and that filtered totals exclude anonymized queries. Clients trust numbers they can reproduce.
- Keep one pattern library per client: brand, questions, local, folders.
- Re-check the brand list when the client launches a product or renames a service.
- Use the same date ranges and filters month to month.
- Show the regex in an appendix so the client's team can reproduce it in the Performance report.
- Move recurring filters into Looker Studio so they update automatically.
Our white label Looker Studio SEO report guide shows how to build these segments into a branded dashboard. If you want the reporting done under your brand, book a 30-minute call.
Frequently asked questions
Is Search Console regex case-sensitive?
No, by default it is case-insensitive. Add (?-i) at the start for case-sensitive matching. This is useful when a brand name or product code must match exactly. Test the pattern on a small set of queries first to make sure it returns the results you expect.
Can Search Console regex filter by country or device?
Regex works on queries and pages; country and device have their own standard filters. Combine a regex filter with those filters to narrow results, for example branded queries on mobile in one country. Save the patterns you use most so reports stay consistent.
Why does a regex that works in another tool fail in Search Console?
Search Console uses RE2, which does not support lookarounds or backreferences. Rewrite the pattern using simpler expressions, such as alternation with the pipe symbol or anchors for the start and end of text. Test it in Search Console before using it in client reports.
Does filtering by regex change total clicks?
It can, because query filters exclude anonymized queries from totals. Explain this in reports so clients do not think traffic dropped. Compare filtered data with the overall totals and use the same filters each month for consistent trends. Note the filter on every chart.
Can you save regex filters in Search Console?
Keep your patterns in a shared document or in a Looker Studio report so they are reused consistently. Name each pattern clearly, such as branded queries or service pages, and note what it includes. This saves time and keeps reports consistent across the team.
Want these agency guides first? Choose White Label SEO LATAM as a preferred source on Google, and my articles are more likely to show up for you in Top Stories.
Follow on GoogleAdd as a preferred sourceSources
- Search Console Help, Performance report (Search results): Advanced filtering and comparison
- Google RE2, Syntax reference
- Search Console Help, Performance report (Search results): Dimensions and data groupings
- Search Console Help, Performance report (Search results)
- Search Console Help, About bulk data export of Search Console data to BigQuery