How do I use regex filters in Google Search Console?
Performance Reports & Data
In the Performance report, click + Add filter, choose Query or Page, select Custom (regex), pick Matches regex or Doesn't match regex, type the pattern and click Apply. Search Console uses Google's RE2 syntax, matches anywhere in the text unless you anchor the pattern with ^ or $, and ignores upper and lower case unless you start the pattern with (?-i).
How Search Console reads a pattern
Google's filtering help sets out the rules:
- RE2 syntax. Character classes, alternation, repetition and anchors all work. Lookaheads, lookbehinds and backreferences don't exist in RE2.
- Partial matching.
shoesmatches "running shoes for women". Use^shoes$to match the query "shoes" and nothing else. - Case-insensitive by default. Prefix
(?-i)when case matters, as in a URL path with capitals. - Alternatives go in parentheses, separated by a vertical bar:
(price|cost|pricing). - Only queries and pages accept regex. Countries, devices and search appearance have their own fixed choices.
- Page filters see the full URL, protocol and host included, so
^/blog/matches nothing; use/blog/or anchor the whole address.
Patterns worth saving
- Questions:
^(who|what|when|where|why|how|which|can|does|is|are)\bon Query. - Comparisons:
\b(vs|versus|alternative|alternatives|compared)\bon Query. - Long-tail queries of five words or more:
^(\S+\s+){4,}\S+$on Query. - Queries that mention a year:
\b20[0-9]{2}\bon Query. - Non-brand traffic:
(acme|acmee|acme corp)with Doesn't match regex on Query, listing your brand's spellings. - Two sections at once:
/(blog|guides)/on Page. - Pages with parameters:
\?on Page. The question mark has to be escaped, as do dots in host names (www\.example\.com).
Test a pattern against a few known queries first: a typo can quietly match nothing, and an empty table looks the same as no data.
Mistakes that skew the numbers
- Expecting lookaheads to work. Patterns such as
^(?!.*brand)aren't valid RE2. Use Doesn't match regex with a plain pattern instead. - Reading totals as site totals. Queries Google anonymises for privacy are left out of the totals once a query filter is on, so filtered numbers add up to less than the unfiltered chart (dimensions and groupings).
- Forgetting the filter is still there. Filters persist while you switch tabs, so a page filter set earlier also shapes the Queries tab you are reading now.
How AutoPSEO helps
AutoPSEO's filters send the same RE2 patterns for queries and pages straight to Search Console, and add one-click presets so you don't have to write them: questions, informational, navigational, transactional, comparison, local and negative queries, years, short and long queries, PDFs and numbered page URLs. Enter your brand terms once in the property setup and every report gains a branded and non-branded split, built as a regex for you.
More in Performance Reports & Data
- How do I use the Performance report in Google Search Console?
- What do clicks, impressions, CTR, and average position mean?
- How much historical data does Google Search Console store?
- Can I use Google Search Console for keyword research?
- Why does my Search Console data differ from Google Analytics?
- What is a good CTR in Google Search Console?
Put your SEO content on autopilot
Connect Search Console and your site. AutoPSEO scans it and plans the first topics right away. No credit card needed.