SEOPlaybook15 min readPublished October 4, 2026

One filter, two dimensions, twenty saved searches for queries and pages

Search Console Regex Filters: 20 Patterns Worth Saving

Google Search Console's Performance report accepts a custom regular expression on its Queries and Pages filters. Google's help pages say which engine it runs, how it matches by default and what it will not do. This page turns those rules into 20 patterns a site owner or SEO can paste in, each one run through the same regex engine before it was printed.

DA
Digital Applied Team
Senior strategists · Published October 4, 2026
PublishedOct 4, 2026
Read time15 min
SourcesSearch Console Help · RE2 wiki
Patterns in this reference
20·
each tested in RE2 on October 9, 2026
Engine Google names
RE2·
no lookarounds, no backreferences
Default matching
Partial·
anywhere in the string unless anchored
Default case handling
(?-i)·
the prefix that turns case sensitivity on

Search Console's Performance report has carried a regular-expression option on its Queries and Pages filters for years, and Google's help centre documents it in a few dozen lines: the engine is RE2, matching is partial unless you anchor the pattern, and matching ignores case unless you switch that off. Those three rules are the whole specification. What the help centre does not give you is a working set of patterns, and most of the ones circulating on marketing blogs were never run through the engine Google actually uses.

This reference fixes that. Twenty patterns, grouped by the question they answer, with what each one finds, an example of a matching query or URL, and the mistake that makes it match too much or too little. Every pattern was compiled and run against sample strings in Google's own open-source RE2 engine on October 9, 2026, so a pattern printed here will not be rejected by the filter for using a feature RE2 does not support.

It is written for the site owner or content editor who opens the Performance report once a week and wants a saved answer to "which questions do people ask us" or "how is the blog doing versus the product pages", and for the SEO who already uses the filter and wants the edge cases written down. If your traffic has just fallen and you are here to find out why, start with our step-by-step traffic-drop diagnosis and come back for the patterns that isolate each page group.

Key takeaways
  1. 01
    Three rules govern every pattern.Google's help page states them: the syntax is RE2, the default is a partial match anywhere in the string, and matching is not case-sensitive unless you prepend (?-i). Anchor with ^ and $ when you mean the whole string.
  2. 02
    RE2 refuses the features that make other regex slow.Lookahead, lookbehind, backreferences and possessive quantifiers are all marked not supported in the RE2 syntax reference. A pattern copied from a Python or JavaScript tutorial that uses them will be rejected by the filter.
  3. 03
    Word boundaries are the most useful escape and the most misread.\b stops 'free' from matching 'freedom' and 'vs' from matching 'versatile'. RE2 defines it at an ASCII word boundary, so it behaves differently next to accented characters.
  4. 04
    A query filter changes the totals, not just the rows.Google's dimensions page says anonymized queries are included in chart totals unless a query filter is applied. The moment you add a regex on Queries, the chart drops the anonymized share, so a filtered total is not a slice of the unfiltered one.
  5. 05
    Test a pattern before you save it.Section 08 describes a short check using the google-re2 Python package, which runs the same engine Google names. The 20 patterns here passed it; your edited versions should too.

01 — The FilterWhere the regex option lives, and what it replaces.

Open the Performance report for Search results, click the filter row's add button, and choose either Queries or Pages. Each of those two dimensions offers the same three ways to narrow the data. Google's filtering article lists them as a containing filter, a not-containing filter and a custom regex filter. The containing filter takes one substring and matches it exactly apart from case, spaces included. The regex filter takes a pattern and offers two directions: the default matches-regex, and a doesn't-match-regex option that returns everything except what the pattern catches.

The practical difference is breadth. A containing filter answers one question: does this query include the word "pricing". A regex answers a family of questions at once: does this query include "pricing", "price", "cost" or "cheap", as whole words, without also catching "costume". Google's own suggested form for the simplest case is a parenthesised list separated by vertical bars, and most of the patterns below are elaborations of that one idea.

One example of where the containing filter is the wrong tool: a site with a blog at /blog/ and a product catalogue at /product/ wants to compare the two groups. "URLs containing blog" works for the first and fails for the second, because a product called "blog-planner-notebook" lands in both. The regex version anchors on the host and the first path segment and the ambiguity disappears. One failure case the other way: a regex that is only a plain word, with no anchors or boundaries, behaves exactly like the containing filter and gains nothing but complexity. Reach for regex when the question has an "or", a position, or a shape in it.

Queries containing
One substring, exact apart from case
Text

Google's filtering article: the match is not case-sensitive but is otherwise exact, including any spaces. Fastest when every item you want shares an identical fragment.

Single fragment
Custom (regex) · matches
A pattern, partial match by default
RE2

The pattern can match anywhere in the query or URL unless you anchor it. Alternation, character classes, repetition and word boundaries are all available.

Families of items
Custom (regex) · doesn't match
The same pattern, inverted
RE2

Returns every row the pattern does not catch. This is how one brand pattern yields both a brand view and a non-brand view without writing a second expression.

Exclusions

02 — Engine RulesThree rules the help page states, and one it implies.

Google's filtering article gives three statements under "Regular expression details", and every pattern in this reference depends on them. First, the syntax is RE2, the open-source engine Google maintains on GitHub. Second, default matching is a partial match: in Google's words, your regular expression can match anywhere in the target string unless you use the start-of-string or end-of-string anchors. Third, matching is not case-sensitive by default, and you prepend (?-i) to make it case-sensitive. Google's example is that (?-i)AAA matches a URL ending in uppercase AAA and not one ending in lowercase aaa.

The implied rule is the one that trips people who learned regex elsewhere. RE2 is deliberately a smaller language than Perl, PCRE, Python or JavaScript regex, and it leaves out the constructs that can make a pattern slow. The RE2 syntax page lists each feature it omits and marks it "NOT SUPPORTED". The ones that matter for Search Console are lookahead and lookbehind in all four forms, backreferences in every notation, possessive quantifiers, atomic groups, and the \Z end-of-text escape. If a pattern from a tutorial uses any of these, the filter will not accept it.

Why it matters in practice: the most common tutorial pattern for "queries that contain A but not B" uses a negative lookahead, and it will never run in Search Console. The alternative is two conditions, one matching A and one not matching B: the Search Console API combines an includingRegex and an excludingRegex filter on the same dimension, and Google's help pages do not say whether the report UI accepts both at once, so check your property. A failure case on the other side: \b is supported, but RE2 defines it at an ASCII word boundary, so a pattern like \bcafé\b may not behave as expected because the accented character is not an ASCII word character. For non-English queries, prefer explicit spaces or anchors over word boundaries.

Source: RE2 syntax reference (google/re2 wiki) and Google Search Console help, "Performance report (Search results): Advanced filtering and comparison", both read October 9, 2026.
FeatureIn Search Console regexWhat to use instead
Alternation (a|b), classes [abc], repetition * + ?SupportedThe core of every pattern below
Counted repetition {n,m}Supported; counts above 1,000 are rejectedUsed for word counts and date segments
Word boundary \bSupported, ASCII onlySpaces or anchors for accented text
Case flag (?-i) / (?i)Supported; default is insensitivePrepend (?-i) only when case carries meaning
Lookahead / lookbehind (?=…) (?!…)Not supportedA matches and a doesn't-match filter (API; check the UI)
Backreferences \1, \k<name>Not supportedSpell the repeated text out twice
Possessive and atomic groups *+ (?>…)Not supportedPlain quantifiers; RE2 is linear anyway
End-of-text \ZNot supportedUse $ or \z

03 — Query IntentEight patterns that sort queries by what the searcher wants.

The first group reads intent from the words people type. Question queries are a common first request from editors, because they tell an editor which FAQs the archive already ranks for and which it is missing. The pattern anchors a list of question words to the start of the query and closes it with a word boundary so "how" does not match "however" and "is" does not match "island". The how-to pattern is a narrower cut of the same idea for instructional content.

The remaining six catch comparison shopping, list-seeking, local intent, price intent, a date modifier and navigational queries for an existing customer. Each one is a whole-word alternation. The year pattern deserves a note: \b202[4-7]\b matches 2024 through 2027 as standalone tokens, which is what you want when checking whether a refreshed guide is picking up the current year's searches, and it will need its range widened in 2028.

One failure case runs through the whole group. Without the word boundaries, "free" catches "freedom", "top" catches "topic", "vs" catches "versatile", and the filtered totals are quietly wrong. The pitfall column names the specific false match each boundary prevents, because that is the test to run after you edit a pattern for your own vocabulary.

Patterns 1–8. Each compiled and run in RE2 (google-re2 Python package) with case-insensitive matching on October 9, 2026; example matches and the named false matches were asserted.
PatternFindsExample matchPitfall it avoids or carries
^(who|what|when|where|why|how|which|can|does|do|is|are|should)\bQuestion queries"what is a 301 redirect"Without ^ it also catches "best how to guide"; without \b, "however" and "island"
^how (to|do|can|does)\bInstructional queries"how do i file taxes"Does not match "how it works", which is a question but not a task
\b(vs|versus|compared?|comparison|alternatives?)\bComparison queries"ga4 vs matomo"The boundaries stop "versatile" and "compareto"
^(best|top)\b|\b(best|top) \d+\bList-seeking queries"top 10 tools", "the top 5 apps""topic" and "bestseller" are excluded; "best practice" is included, which you may not want
\bnear me\bLocal intent"plumber near me"Misses "in [city]" phrasing; add a city alternation for a local business
\b(price|prices|pricing|cost|costs|cheap|affordable|free)\bPrice intent"cost of seo", "free crm""freedom" and "costume" excluded; "free" also catches "free trial" and "gluten free"
\b202[4-7]\bYear-modified queries"seo trends 2026"Widen the range each January; "2023" is deliberately outside it
\b(login|log in|sign in|careers?|jobs|contact)\bNavigational, existing-customer"acme login", "acme jobs"Use with "doesn't match" to remove these from a content report

04 — Brand SplitBrand and non-brand, by regex or by Google's own switch.

The brand split is the oldest use of this filter and the one Google has partly automated. Its dimensions page documents a branded and non-branded queries filter that separates data on whether the search term included your brand name. Three caveats come with it in Google's own text: the filter is not available for sites with a low number of impressions, it provides a 16-month history starting from its introduction in March 2025, and some queries might be incorrectly identified as branded or non-branded. Google also says the classifications are for information only and do not affect ranking.

So why keep a regex version? Because the regex is yours. A small site below the impressions threshold has no built-in switch at all. A larger site with a brand name that is also a common word, or a portfolio of product names, gets to decide what counts. The pattern below is a whole-word alternation of the brand, its common misspelling and its two-word form; replace "acme" with your own list. Run it once as matches-regex for the brand view and once as doesn't-match-regex for the non-brand view, and every visible query lands in exactly one of the two by construction, which the automated filter does not promise. The totals still will not sum to the unfiltered figure, for the reason in Section 07.

The failure case is a brand that appears inside other words. A company called "Ion" cannot use ion without boundaries, and even with them it will catch "ion exchange". The fix is to list the brand's real query forms, "ion software", "ion login", "ion pricing", rather than the bare word, which is what the second pattern does.

Patterns 9–10. "acme" is a placeholder. Tested in RE2 on October 9, 2026; Google's built-in branded filter is described on its Performance report dimensions page, read the same day.
PatternFindsExample matchPitfall it avoids or carries
\b(acme|akme|acme corp)\bBrand queries, including a misspelling; invert for non-brand"ACME Corp pricing""acmeology" and "pacme" excluded; add each real misspelling you see in the report
\bacme (login|pricing|reviews?|support|app)\bBrand plus a task word"acme login"Safer than the bare brand when the brand is a dictionary word
Which brand split to trust
Use Google's built-in branded filter when it is offered and you want Google's definition, for example to compare against a report someone else ran. Use the regex when you need every query in exactly one half, when your site is below the impressions threshold, or when the brand shares its name with a common word. Record which one a report used in its caption, because the two will not agree to the query.

05 — Query ShapeLength, language and spelling, read from the shape of the string.

Some useful filters say nothing about vocabulary and everything about form. The long-tail pattern counts words: a run of at least four "non-space then space" groups followed by one more word means five words or more, anchored at both ends so the count is of the whole query. Change the number inside the braces to change the threshold. This is the cleanest way to see whether a site's growth is coming from long, specific searches or short head terms. The anchors matter once you add an upper limit, such as {2,3} for three to four words, because Google's partial-match default would otherwise find four words inside a longer query.

The non-ASCII pattern matches any query containing a character outside the basic ASCII range, which on an English-language site is a fast way to find traffic from other languages or from accented brand names, and on a multilingual site a way to split by script. The spelling-variant pattern shows the general trick for a term people write three ways: an optional hyphen-or-space between the two parts, and the one-word form as a second alternative.

Failure cases: the word-count pattern treats any run of whitespace as one separator, but a leading or trailing space makes the anchored pattern miss the query entirely. And the non-ASCII class catches typographic quotation marks and em dashes too, so a handful of English queries will land in it; sort by impressions and the genuine other-language rows will dominate.

Patterns 11–13. Tested in RE2 on October 9, 2026 with the stated example matches and non-matches.
PatternFindsExample matchPitfall it avoids or carries
^(\S+\s+){4,}\S+$Queries of five or more words"one two three four five"Anchors matter once you cap the count: without them, {2,3} still matches a six-word query
[^\x00-\x7F]Queries with any non-ASCII character"cómo", "café seo"Also catches curly quotes and dashes in English queries
\bsign[- ]?up\b|\bsignup\bOne term written three ways"sign up", "sign-up", "signup""signature" excluded; the template works for any compound

06 — Page GroupsSeven patterns that carve a site into page groups.

The Pages dimension holds full URLs, which Google's dimensions page defines as the final URL linked by a Search result after any redirects. Because they are full URLs, the strongest patterns anchor on the scheme and host and then name a path. The blog-subfolder pattern is the model: it matches everything under /blog/ on one host and nothing under /blogs/ or on a staging host. The product-template pattern goes the other way and matches only the leaf page of a section, excluding its sub-pages such as reviews.

Three more find URL shapes that usually should not be earning impressions at all: tracking parameters, pagination, and date-stamped archive paths that were meant to be redirected. The file-type pattern finds PDFs and office documents that rank, which is a routine surprise on business sites and a reason to give the content an HTML home. The parameter pattern is one character, an escaped question mark, and it is the quickest way to see whether Google is indexing parameterised duplicates of canonical pages.

Failure cases are mostly about escaping. A dot in a hostname must be written \. or it matches any character, which is harmless on a host filter and dangerous on a file-type filter, where .pdf unescaped also matches "/pdf-guide". The question mark must be escaped for the same reason, since a bare ? is a quantifier. And remember partial matching: a product pattern without the end anchor matches every URL that merely passes through the section.

Patterns 14–20, applied on the Pages dimension. "www.example.com" is a placeholder. Tested in RE2 on October 9, 2026.
PatternFindsExample matchPitfall it avoids or carries
^https://www\.example\.com/blog/Every page under the blog folderhttps://www.example.com/blog/postExcludes /blogs/ and other hosts; keep the anchor
/product/[^/?#]+$Product pages only, not their sub-pageshttps://www.example.com/product/red-shoeWithout $ it also matches /product/red-shoe/reviews
\?Any URL with a query stringhttps://www.example.com/p?x=1Unescaped, ? is a quantifier with nothing to repeat, and RE2 rejects the pattern
[?&](utm_|gclid|fbclid|msclkid)Indexed URLs carrying tracking parametershttps://a.com/?a=1&gclid=2The leading class stops a path like /utm_source matching
[?&]page=\d+|/page/\d+/?$Paginated listingshttps://a.com/blog/page/3/"?pageview=1" is excluded by the digit requirement
/20\d{2}/\d{2}/Date-stamped archive pathshttps://a.com/2025/03/postMatches a year-and-month segment anywhere in the path
\.(pdf|docx?|xlsx?|pptx?)($|\?)Documents that rank as pageshttps://a.com/x.docx?dl=1Escaped dot and the end test stop "/pdf-guide" and "x.pdf.html"

07 — Known LimitsWhat the filter cannot see, in Google's words.

A regex filter is only as complete as the rows it runs over, and Google's dimensions page is candid that the rows are not complete. Two statements matter. On anonymized queries: some queries are omitted to protect user privacy, and they are included in chart totals unless a query filter is applied. On truncation: due to internal limitations, Search Console stores and shows only the most important data rows, and the most complete list of queries is available through bulk data export.

The consequence for any report built on these patterns is that a filtered total is not a share of the unfiltered total. Add a regex on Queries and the chart's anonymized share drops out, so a brand view and a non-brand view will not sum to the all-queries figure you saw before filtering. Say so in the caption of any chart you share, or compute shares only between two filtered views. Google's filtering and troubleshooting pages say the same applies to page filters: filtering by query or URL can change the totals, through truncation and the omitted anonymized queries.

One more limit is structural rather than documented: the regex applies to one dimension at a time. There is no pattern that joins a query to a page. For "question queries landing on blog pages", apply the question pattern on Queries and the blog pattern on Pages as two filters, which the report supports. The router below says which tool to reach for in each situation, including the cases where the regex is the wrong answer. For the related question of how the AI Mode and follow-up query rows behave under a filter, see our note on AI Mode follow-up queries and data quality.

Every item you want shares one exact fragment
Queries containing / URLs containing
Containing
The question has an 'or', a position or a shape in it
Custom (regex), matches
Regex
You want everything except a family
Custom (regex), doesn't match
Regex
The condition spans queries and pages
Two filters, one per dimension
Stacked
You need every query, not the shown rows
Bulk data export, then filter offline
Export
You want Google's definition of brand
Built-in branded / non-branded filter
Built-in

08 — TestingTest a pattern before you save it.

Search Console can reject a pattern RE2 does not support, and it cannot tell you a valid pattern is matching the wrong rows. Both problems are cheap to catch outside Search Console, because the engine is open source. The google-re2 package on PyPI wraps the same RE2 library, and four lines are enough to compile a pattern with Google's default case handling and assert what it should and should not match. That is the check every pattern on this page passed.

The method we used: for each of the 20 patterns, a list of strings that must match and a list that must not, including the specific false match named in its pitfall column. The script compiles the pattern with the (?i) prefix, which mirrors Search Console's case-insensitive default, and fails if any assertion fails or if RE2 rejects the pattern. All 20 passed, with 0 compile failures and 0 wrong matches, on October 9, 2026. Any pattern you adapt for your own brand, host or vocabulary deserves the same minute, and the failure to look for is a boundary or anchor you removed while editing.

Two things the test cannot do. It does not know your data, so it cannot tell you a pattern matches nothing on your site; sort the filtered table by impressions and check the top rows by eye. And it does not reproduce Search Console's row truncation, so a pattern that is correct can still return fewer rows than the site really has. If you want this set extended for a specific property, or the patterns turned into a standing weekly report, that is the kind of work our agentic SEO service builds and maintains. The related multimodal search-type filter and the repaired links report are covered separately.

09 — ConclusionThree rules, twenty patterns, one caveat on totals.

What to do with this

Save the five patterns your site actually needs, test each one you edit, and caption every filtered chart with the anonymized-query caveat.

Search Console's regex filter runs RE2, matches partially unless anchored, and ignores case unless told otherwise. Everything else follows from those three statements in Google's help text, and the twenty patterns above are the ones we reach for most, each run through the real engine so the filter will accept it.

Most sites need five of the twenty on a weekly basis: question queries, the brand split, long-tail by word count, the blog or product subfolder, and the parameter check. Save those as named report links. Edit the brand and host placeholders first, and run the RE2 test from Section 08 on anything you change, because the common editing mistake is dropping a boundary or anchor and silently widening the match.

Then write the caveat down where the chart lives: a query filter removes anonymized queries from the totals, so a filtered figure is not a share of the unfiltered one, and the table shows the rows Google considers most important rather than all of them. A regex report that says this is one a colleague can trust; one that does not will eventually be compared to the wrong denominator.

Turn the filter into a weekly report

A saved filter is worth more than a monthly export.

We build standing Search Console reports for small and mid-sized sites: saved filters, page-group splits, brand and non-brand tracking, and the checks that keep the numbers honest after we hand them over.

Free consultationExpert guidanceTailored solutions
What we work on

Search Console reporting

  • →Search Console pattern sets for your own vocabulary
  • →Page-group reports with stable denominators
  • →Brand and non-brand tracking with documented denominators
  • →Bulk export pipelines when the table is not enough
  • →Query-intent dashboards editors actually open
FAQ · Search Console regex

The questions we get every week.

RE2, according to Google's own filtering help page, which states under its regular-expression details that the RE2 syntax is used. RE2 is the open-source engine Google maintains, and its syntax reference marks lookahead, lookbehind, backreferences, possessive quantifiers and atomic groups as not supported. A pattern that uses any of those will be rejected by the filter, so patterns copied from Python, JavaScript or PCRE tutorials often need rewriting before they run.
Digital Applied newsletter

Deep dives on AI, marketing and development.

Practical guides and fresh insights by email. No recycled takes.

Related dispatches

Continue exploring Search Console reporting.

Google Search

See more Digital Applied analysis in your Google results by adding us as a preferred source.

Add as a preferred source