Every regex worth running in Search Console, organised by the question it answers. Plus the reason half the patterns you will find elsewhere quietly do nothing.
Read this first. Search Console does not run the regex engine you are used to. It runs Google’s RE2, which has no lookaheads, no lookbehinds and no backreferences.
That single fact invalidates a large share of the GSC regex advice in circulation, including a pattern that used to sit on this very site. If you have ever pasted a regex into Search Console and got nothing back, this is usually why. Jump to the compatibility table.
What regex is in Google Search Console, and where to find it
Regex is a way of describing a pattern instead of a single value. In Search Console it turns the query and page filters from “one thing at a time” into “every thing that looks like this.”
To get to it: Performance → Search results → + New filter → Query (or Page) → Custom (regex). A second dropdown lets you choose Matches regex or Doesn’t match regex. That second dropdown matters more than almost anything else on this page, and the section below explains why.
Regex does not work everywhere in Search Console. It works on exactly two dimensions:
| Where | Regex? | Notes |
|---|---|---|
| Performance → Query | Yes | The main event. Queries are stored lowercase. |
| Performance → Page | Yes | Full URLs, and these are case sensitive. |
| Search Appearance | No | Predefined values only, now including AI Mode. |
| Country / Device | No | Dropdown selection only. |
| Discover / News reports | Page only | No query dimension exists to filter. |
| URL Inspection, Indexing, Sitemaps | No | Not filterable at all. |
The RE2 compatibility table
This is the table nobody publishes, and it is the reason copied patterns fail. Google built RE2 to guarantee patterns run in linear time, and the price of that guarantee is that several familiar features simply do not exist.
| Feature | Works | What to do instead |
|---|---|---|
Negative lookahead (?!...) | No | Switch the dropdown to Doesn’t match regex |
Positive lookahead (?=...) | No | Rewrite as explicit alternation |
Lookbehind (?<=...) | No | Anchor with ^ or match the whole shape |
Backreferences \1 | No | Write the repeat out literally |
| Atomic groups, recursion | No | Not available in RE2 at all |
Case-insensitive (?i) | Yes | Default is case sensitive. Put it at the very start. |
Anchors ^ $ | Yes | Without them, matching is partial by default |
Alternation |, classes, quantifiers | Yes | Behave exactly as you expect |
Word boundary \b | Yes | The fix for most over-matching problems |
| Pattern length | 4,096 | Characters. Long brand lists hit this ceiling. |
The one that catches everybody. To exclude branded queries, the pattern circulating everywhere is ^(?!.*(brand)).*$. It cannot work. There is no negative lookahead in RE2.
The supported answer is to write the positive brand pattern and flip the dropdown to Doesn’t match regex. Same result, one fewer broken filter.
Not sure whether your pattern will run? Paste it into the checker. It tells you if Search Console, GA4 and Clarity will actually accept it, and what to use instead when they will not.
Regex elements reference
The building blocks, with a Search Console example for each. If you only memorise five, make them |, \b, (?i), ^ and $.
| Element | Means | Example | What it catches |
|---|---|---|---|
| | Or | seo|ppc|cro | Any of the three terms, anywhere in the query |
() | Group | (how|what) to | Keeps the alternation contained |
^ | Start of string | ^how | Queries beginning with “how”, not containing it |
$ | End of string | near me$ | Queries ending in “near me” |
\b | Word boundary | \bseo\b | “seo” but not “seoul” or “video seo tools” |
. | Any character | gr.y | grey, gray, gr8y |
\. | A literal dot | example\.com | Escaping matters inside URL filters |
* | 0 or more | colou*r | color, colour |
+ | 1 or more | \d+ | Any run of digits |
? | 0 or 1 | seo ?arcade | “seoarcade” and “seo arcade” |
{n,} | n or more | (?:\S+\s+){9,} | The word-count trick |
[] | Character class | [0-9]{4} | A four-digit year |
[^] | Not these | [^/]+ | A single URL path segment |
\d \s \S | Digit, space, non-space | \S+ | One word |
(?i) | Ignore case | (?i)cookeville | Essential on Page filters, cosmetic on Query |
The pattern library, by job
Organised by the question you arrived with, not by pattern count. Every one of these is RE2-safe. Copy, paste, adjust the words in the brackets.
Split brand from non-brand
How much of this traffic already knew who we were?
(?i)(brandname|brand ?name|brandnaem|brand-name)
Match gives branded demand. Flip to Doesn’t match regex for real discovery. Include misspellings, spacing variants and hyphenations — that is where every brand filter leaks.
Build the list from your own data first: sort queries by impressions, skim the top 200, and write down every mangled version of your name you find. Do not write it from memory.Sort by intent
Are these people learning, comparing, or buying?
Questions (?i)^(who|what|when|where|why|how|which|can|does|is|are|should)\b Comparison (?i)\b(vs|versus|compared to|alternative to|better than)\b Commercial (?i)\b(price|pricing|cost|buy|hire|agency|consultant|near me|quote)\b Negation (?i)\b(without|instead of|avoid|non|not)\b
The negation row is the one nobody publishes. A query containing “without” or “instead of” is somebody rejecting an option you may not know they were weighing. It is the cheapest competitor research on this page.
Measure query shape over time
Are searches getting longer and more conversational?
10 words or more ^(?:\S+\s+){9,}\S+$
7 words or more ^(?:\S+\s+){6,}\S+$
4 words or more ^(?:\S+\s+){3,}\S+$Track the ratio month over month, not the count. A single month’s number tells you nothing; the slope tells you whether your audience is shifting to conversational search.
Isolate a section of the site
How is this part performing, without the noise?
Section only /blog/ Exclude paging /page/\d+ → set to "Doesn't match" Parameters only \?.+= Top level only ^https://example\.com/[^/]+/?$ Two levels deep ^https://example\.com/[^/]+/[^/]+/?$
Page filters are where case sensitivity genuinely bites. Queries are stored lowercase, URLs are not. If a URL filter returns nothing, add (?i) before you rewrite anything else.
Catch cannibalisation in the act
Which of my pages are fighting each other?
(?i)^(target term|target phrase)$
Anchor both ends to force a near-exact match, apply it, then switch to the Pages tab with the filter still active. Two or more URLs splitting impressions on one anchored query is cannibalisation you can see rather than suspect.
Segment by place and season
Where is this demand, and when does it arrive?
Local (?i)\b(cookeville|nashville|tennessee|tn|near me)\b Seasonal (?i)(christmas|black friday|holiday|spring|summer|20\d\d)
Pair either with the date comparison mode. A seasonal spike only means something next to the same window last year.
Find the long tail no tool can see
What am I ranking for that keyword research never surfaced?
^(?:\S+\s+){6,}\S+$ then add your brand pattern set to "Doesn't match"Long, unbranded, low-impression queries are where genuine content gaps live. Most of them have no measurable volume in any keyword tool at all, which is exactly why they are uncontested.
Custom regex in GSC for brand vs non-brand, and why it is not a reporting trick
The most common use of GSC regex is splitting branded from unbranded. It is also the one most likely to be used for the wrong reason.
The old agency logic went like this: branded searches are people who already knew you, so filtering them out of a report proves the SEO work is doing something. It is a tidy argument and it was standard practice for years.
I ran that play on a client, and I was wrong. Branded queries turned out to be the thing that mattered most, right as AI search arrived, because a brand query is the front door through which a model builds its picture of a company. Filtering them out of the report meant discarding the metric that was about to become the important one.
Being a brand is great, but no one talks about how you actually lose control over it, because stuff starts ranking for your name.
I refer to that as LLM consensus. This is when LLMs are able to find a lot of different sources about you and they are very consistent in their messaging.
Ann Smarty · Unscripted SEO
So run the split, but keep both halves. Non-brand tells you whether you are being discovered. Brand tells you what happens once you are, and increasingly it tells you what an AI model is going to repeat about you. Segmenting is useful. Deleting is not.
Dark clicks: using regex to find the traffic Search Console will not show you
The highest-value use of GSC regex is not segmentation. It is estimating what is missing.
Search Console does not show you every query. Anonymised and low-volume queries are withheld, so a page can report 200 clicks while the query table only accounts for 50 of them. The gap is real traffic with no label on it.
Regex is one leg of a triangulation that puts a number on that gap:
- Apply the brand pattern, then its inverse. Watch how the click totals move. The shift tells you roughly how much of the hidden volume is branded rather than discovery.
- Compare against third-party volume. If you rank second for a term with 500 monthly searches and Search Console reports no clicks for it, that is a very strong signal of where hidden clicks are landing.
- Cross-reference analytics landing pages. Organic sessions on a page that GSC barely credits gives you the third corner.
You can apply different regex to see if it’s a brand and see if that shifts the numbers of the overall clicks for that page. And then that will illuminate, hey, these are branded queries or unbranded queries in this dark shadow area.
Jeremy Rivera, host · discussed with Alex Zweydoff on Unscripted SEO
David Wilson takes the same underlying data somewhere more useful: an expected-CTR model that converts position data into a hard missed-revenue figure, which is a considerably better thing to put in front of a client than a ranking chart. The method is written up as a standalone SOP.
Worth saying plainly: this produces an estimate, not a measurement. Anyone presenting recovered dark clicks as a precise number is overselling it. The value is in the order of magnitude and the direction of travel.
Machine-shaped queries, and a warning about the popular regex
The most shared GSC regex right now claims to isolate AI-driven searches. We tested it. It does not do what people think.
The pattern is a word-count filter, usually ^(?:\S+\s+){9,}\S+$ for ten words or more. The reasoning is that typed searches are short and assistant-mediated searches are long. That reasoning is sound. The problem is what people then claim it proves.
Run against a real property, it matched 3 queries in 1,000. Measured against a detector built to catch actual machine artifacts, that is roughly 5% recall. Against a set of hand-collected real LLM prompts it caught none of them. It is a length filter, and length is a weak proxy for origin. Plenty of humans type long questions; plenty of assistant queries are short.
The genuinely diagnostic signals are the ones a person would never type:
(\?\.|\.\?|<thinking>|you are a helpful|system prompt|as an ai language model)
Punctuation collisions like ?. and leaked prompt fragments are machine residue. They are rare, but when they appear they are close to unambiguous, which is the opposite trade-off to the word-count filter.
The honest answer for 2026: Search Console never confirms where a query came from. Where the AI Mode value now exists in the Search Appearance dimension, use that filter instead of guessing with regex. A real dimension beats a clever proxy every time.
Why your regex is not working
Six symptoms, in the order we see them.
| Symptom | Cause | Fix |
|---|---|---|
| Error, or zero rows on a pattern that works elsewhere | Lookahead, lookbehind or backreference | Rewrite RE2-safe, use Doesn’t match for exclusions |
| Catching far too much | Matching is partial by default | Add ^, $ or \b |
| Brand filter missing obvious variants | No (?i), no spacing or misspelling variants | Add (?i) and ? between words |
| Page filter returns nothing | URL case sensitivity | Prefix with (?i) |
| Pattern rejected as too long | Over the 4,096 character cap | Split across two stacked filters |
| Matching unrelated domains | Unescaped dot | Escape it: example\.com |
Build your own: prompts for ChatGPT and Claude
You do not need to memorise RE2. You need an assistant that knows its limits. Each prompt below states them, because left to itself an assistant will happily hand you a lookahead.
1 · Build a brand pattern that does not leak
I need a regex for the Query filter in Google Search Console. It uses Google's RE2 engine: no lookaheads, no lookbehinds, no backreferences, 4096 character limit, case-sensitive by default. My brand is [BRAND] and we are also called [VARIANTS]. Our products are [PRODUCTS]. Write a single RE2-safe pattern matching every plausible way someone types our name, including misspellings, missing spaces, hyphens and plurals. Explain how to use it for the non-branded view, and do not use a negative lookahead to do it.
2 · Audit a regex somebody gave you
Check this regex for Google Search Console compatibility. GSC runs RE2, which does not support lookaheads, lookbehinds, backreferences, atomic groups or recursion, caps patterns at 4096 characters, and is case-sensitive by default. Pattern: [PASTE] Tell me whether it will run at all, what it will actually match versus what it looks like it matches, and rewrite it RE2-safe if it is broken. If it is fine, say so plainly rather than changing it.
3 · Turn an export into an intent report
Attached is a Search Console query export with clicks, impressions, CTR and position. Bucket every query into: branded, question, comparison, commercial, local, and other. My brand terms are [BRAND]. Then give me, per bucket, the share of impressions, the share of clicks, and the average position. Tell me which bucket has the worst gap between impressions and clicks, and what that gap most likely means for my content.
4 · Estimate your dark clicks
I want to estimate how much Search Console traffic is hidden from my query table. For [PAGE URL] Search Console reports [X] total clicks, but the named queries only account for [Y] clicks. Walk me through triangulating the gap: applying a brand regex and its inverse, comparing my ranking positions against third-party search volume, and cross-referencing analytics landing page sessions. Give me a range rather than a single number, and tell me which assumption in the estimate is weakest.
5 · Track conversational drift
Using my Search Console data for the last 12 months, calculate the share of impressions coming from queries of 7 or more words, month by month. Give me the trend as a percentage of total impressions, not raw counts. Tell me whether the slope is meaningful or within normal noise, and be sceptical: word count is a proxy for conversational search, not proof of it, and nothing in this data confirms a query came from an AI assistant.
Connect Search Console and run the whole library at once
Everything above works by hand, one filter at a time. That is fine for one site and miserable for twenty.
Once Search Console is connected to an assistant, the library stops being something you click through and becomes something you run. Instead of applying eleven filters and exporting eleven CSVs, you ask one question and get the segmentation back as a single report.
The fastest route is OpenSEO. Connect the property once and your Search Console data becomes directly queryable by Claude or ChatGPT, alongside keyword and SERP data, so a regex segmentation and the volume check that validates it happen in the same breath. That matters here specifically, because the dark-clicks method above needs GSC and third-party volume side by side.
A finding from writing this page. Keyword tools report the term “google search console regex” at roughly 10 searches a month. This site’s own Search Console recorded 1,491 impressions for that exact query.
The tools are not lying, they simply cannot see most long-tail and low-volume demand. Your own Search Console is the only honest keyword tool you own, and regex is how you read it.
Questions people actually ask
- What is regex in GSC?
- A pattern-matching filter available on the Query and Page dimensions of the Performance report. It lets one filter stand in for hundreds of individual terms.
- Is there a GSC regex generator?
- There are standalone builders, but the practical answer in 2026 is an assistant with the RE2 constraints stated up front. The prompts above do exactly that, and unlike a generator they explain what the pattern will miss.
- Why does my regex work in an online tester but not in Search Console?
- Most online testers run PCRE or JavaScript regex. Search Console runs RE2. Lookaheads are the usual culprit.
- Is Search Console regex case sensitive?
- Yes by default. It rarely matters on queries, which are stored lowercase, and it matters a great deal on page URLs. Prefix with
(?i)when in doubt. - How do I exclude branded queries?
- Write the positive brand pattern and set the dropdown to Doesn’t match regex. Do not attempt a negative lookahead.
- Can regex tell me which searches came from AI?
- No. It can find queries shaped like assistant output, which is a correlation. Where the AI Mode value exists under Search Appearance, use that instead.
- What is the character limit?
- 4,096 characters per pattern. Long brand and competitor lists reach it faster than you would think.
