Search Console Regex — Query and Page Filters That Actually Work
Search Console lets you filter the Performance report with a regular expression on Queries or Pages — brand vs non-brand splits, question queries, folder rollups, tracking-parameter junk. The catch: it runs Google’s RE2 engine with two defaults that are the exact opposite of GA4. GA4 matches the whole value and cares about case; Search Console matches anywhere in the value and ignores case. Keep reading for the three rules, copy-paste recipes with tested verdicts, and the anchor trap that makes ^/blog/ match nothing.
TL;DR: Search Console regex = RE2 + partial match + case-insensitive. So seo matches “best seo tools” (GA4 would return nothing), AAA matches aaa (GA4 would not), and the negative operator lives in the dropdown — Doesn’t match regex — never in a (?!...) lookahead, which RE2 rejects. One more trap: the Pages dimension stores full URLs, so ^/blog/ silently matches zero rows.
Where regex lives in Search Console
Open Performance → Search results, click + Add filter, choose Queries or Pages, then Custom (regex). Two options: Matches regex (default) and Doesn’t match regex. To filter several values at once, separate them with a pipe and wrap the whole expression in parentheses: (value1|value2|value3) — exactly the shape Google’s own documentation prescribes.
Regex is only available on those two dimensions. Countries and devices get plain filters; there is no regex on Search type or Search appearance. And one caution before you build anything: Google documents that filtering by query or URL changes report totals (data truncation plus omitted anonymized queries) — a filtered chart is for comparing shapes, not for summing back to your unfiltered numbers.
Three defaults that catch GA4 users off guard
If you arrive from the GA4 side of this site, these are the rules that will surprise you. Same engine (RE2), opposite behaviour:
| Rule | GA4 | Search Console |
|---|---|---|
| Match scope | Full match — pattern must cover the whole value | Partial — pattern can match anywhere |
| Case | Case-sensitive by default | Case-insensitive by default; (?-i) to opt out |
| Engine | RE2 | RE2 (no lookahead, no lookbehind, no backreferences) |
| Negative filter | “does not match regex” operator | “Doesn’t match regex” dropdown |
| Regex length cap | 250 characters in report filters | No documented cap in Google’s help |
The same pattern, two verdicts — try each row and watch the highlight:
| Pattern | Value | Search Console (partial, ignore case) | |
|---|---|---|---|
blog |
best blog post |
match — GA4’s full match would return nothing | Try → |
blog |
BLOGging tips |
match — case is ignored by default | Try → |
^example |
an example |
no match — ^ pins the start (official doc example) |
Try → |
^seo$ |
best seo tools |
no match — anchors restore GA4-style exactness | Try → |
AAA |
https://example.com/aaa |
match — flip case-sensitivity with a leading (?-i) (RE2 only) |
That last row has no Try link on purpose: (?-i) is RE2-only syntax — the tester’s JavaScript engine rejects inline flags outright, while plain JavaScript matching here is case-sensitive by default (the opposite of Search Console). This page’s Try links therefore load with the case-insensitive flag to mirror what Search Console would do; details on the engine gap in RE2 vs PCRE.
Copy-paste recipes
Every pattern below was executed against the verdicts shown before this page went live. Each Try link loads the pattern with sample data into the tester, matching Search Console’s ignore-case default.
1. Brand queries — and the non-brand split
One pattern gives you both halves of the brand report. Under Matches regex you see everything branded; switch the dropdown to Doesn’t match regex and the same pattern returns everything else — that non-brand number is the one SEO actually moves:
| Pattern | Value | Verdict | |
|---|---|---|---|
acme|akme|acmee | Acme pricing | match — brand hit, misspelling included | Try → |
competitor tool | no match — this row is what “Doesn’t match regex” keeps | Try → |
2. Question queries — the cheapest FAQ source you have
Queries that start with a question word are people asking for help. The ^ and the trailing \b both matter — without them “how” also matches inside “show”, “however” and “island”:
| Pattern | Value | Verdict | |
|---|---|---|---|
^(who|what|when|where|why|how|which|can|does|do|is|are|should)\b | how to check ctr | match — question at the start | Try → |
seo how to rank | no match — question word is not first | Try → | |
island holidays | no match — \b stops “is” matching inside “island” | Try → |
3. Comparison & buying intent
People closer to a decision type these. Combine with position data (queries sitting at positions 8–20 are your striking-distance wins):
| Pattern | Value | Verdict | |
|---|---|---|---|
\b(vs|versus|alternatives?|compare|comparison|reviews?|pricing|cost)\b | ahrefs vs semrush | match | Try → |
regex101 alternatives | match | Try → | |
bestseller | no match — \b blocks the bare-word trap | Try → |
4. Long-tail queries (five words or more)
Long queries are specific, and specific is where a small site beats a big one. Count runs of non-space characters:
| Pattern | Value | Verdict | |
|---|---|---|---|
^(\S+\s+){4,}\S+$ | how to fix crawled currently not indexed | match — seven words | Try → |
ga4 regex not working | no match — only three words | Try → |
5. Page folders — remember, Pages are full URLs
The Page dimension stores the whole URL, so folder patterns work without a leading ^ (partial match does the rest):
| Pattern | Value | Verdict | |
|---|---|---|---|
/(blog|guides|resources)/ | https://example.com/blog/post-a | match | Try → |
https://example.com/guides/seo | match | Try → | |
https://example.com/products/shoes | no match | Try → |
GA4’s page_path dimension, by contrast, stores only the path — the same folder pattern there is ^/(blog|guides|resources)/. Full breakdown of that dimension in the GA4 page path regex guide.
6. Tracking parameters & file downloads
Two hygiene filters worth having: URLs with leaked tracking parameters (candidates for canonicalisation) and PDFs/docx ranking in search:
| Pattern | Value | Verdict | |
|---|---|---|---|
[?&](utm_|gclid|fbclid) | https://example.com/landing?gclid=abc | match — parameter leaked into the index | Try → |
[?&](utm_|gclid|fbclid) | https://example.com/landing | no match | Try → |
\.(pdf|docx?)$ | https://example.com/files/report.pdf | match | Try → |
\.(pdf|docx?)$ | https://example.com/files/readme.txt | no match | Try → |
The negative lives in the dropdown, not in the pattern
Every regex tutorial online reaches for a negative lookahead when it wants to exclude something: ^(?!.*brand).*$. In Search Console that pattern is rejected — RE2 does not implement lookahead at all. The tool already ships the negation: pick Doesn’t match regex and hand it a normal positive pattern. Same result, zero syntax risk. (The identical rule applies in GA4’s does not match regex operator — the full catalogue of RE2-illegal constructs and their replacements is in RE2 vs PCRE.)
The tester-won’t-catch-it trap: your JavaScript editor or an online tester accepts lookahead, lookbehind and backreferences — they are valid PCRE/JS. They only fail once pasted into Search Console, which gives you no row-level error, just fewer results than expected. If a pattern contains (?! , (?<= or \1, rewrite it before you ship it: see every replacement in RE2 vs PCRE.
Five ways a Search Console regex silently misbehaves
- The
^/blog/anchor trap. Page values are full URLs —^/blog/demands the value start with a slash, so it matches zero rows and the report looks “empty”. Drop the anchor (/blog/) or include the host (^https://example\.com/blog/). GA4’s path-only dimension is the reverse situation — there the anchor is correct. - Partial match means short patterns match everywhere.
seocatches “best seo tools”, “seo tools” and “seo” alike — usually what you want for queries, occasionally too broad for Pages. Restore exactness with^pattern$. - Case-insensitive by default — the opposite of GA4.
AAAmatchesaaawithout any flag. When case does matter (URL paths with capital letters are a classic duplicate-content signal), prepend(?-i):how | whymatches the strings “how “ and “ why” with the spaces attached — rarely what you meant. Writehow|why. - Filtered totals ≠ unfiltered totals. Google documents that query/URL filters change totals through data truncation and omitted anonymized queries. If brand + non-brand adds up to less than the headline number, that is the documentation working as described — not your pattern failing.
FAQ
Where do I find regex filters in Search Console?
Open Performance → Search results, click + Add filter, choose Queries or Pages, then Custom (regex). Regex exists only on those two dimensions — countries, devices and search appearances use plain filters.
What regex syntax does Search Console use?
RE2 — the same engine as GA4 and BigQuery. Two defaults decide most outcomes: matching is partial unless you anchor with ^ and $, and matching is case-insensitive unless you prepend (?-i). Lookahead, lookbehind and backreferences are rejected outright. The full construct-by-construct mapping is in RE2 vs PCRE.
Why did my clicks and impressions totals change after adding a regex filter?
Google documents that filtering by query or URL affects report totals through data truncation and the omission of anonymized queries. The filtered view is a different measurement, not a subset you can sum back — compare period-over-period shapes inside the same filter instead.
How do I exclude values with regex?
Use the Doesn’t match regex option in the filter dropdown — it inverts your positive pattern for you. Never write a negative lookahead: RE2 rejects (?!...), and the pattern will simply not do what it does in other tools. The same operator logic exists on the GA4 side, mapped per screen in GA4 regex match types.
How is Search Console regex different from GA4 regex?
Same engine, opposite defaults. GA4’s matches regex is a full match and is case-sensitive; Search Console is partial and case-insensitive. A pattern written for one tool usually needs anchors added or removed for the other — blog returns nothing in GA4 but everything containing “blog” in Search Console. Full GA4-side semantics: GA4 regex match types.
Does the Pages filter take a path or a full URL?
A full URL. The Page dimension stores https://example.com/blog/post, not /blog/post — so a path anchor like ^/blog/ matches nothing. Drop the leading anchor or include protocol and host. (GA4’s page_path is the opposite: path only — see the page path regex guide.)
Related on RegexLab: GA4 regex match types (the full-vs-partial map on the GA4 side), RE2 vs PCRE (every construct Search Console rejects and its fix), GA4 regex cheat sheet, GA4 page path regex for the path-vs-full-URL contrast, BigQuery REGEXP_EXTRACT vs REGEXP_CONTAINS for the same RE2 engine in SQL, Looker Studio regex where Regexp Match flips back to full-value semantics like GA4, and the regex pattern library for ready-made patterns beyond Google tools.