Search Console regex cheat sheet: 15 filters
Fifteen tested RE2 patterns for the Query and Page filters, with what each finds and what to watch out for.
Free, no sign-up · works in Excel, Google Sheets, Numbers, Notion or any Markdown editor
At a glance
- Sections
- 4
- Type
- Cheat sheet · spreadsheet
- Formats
- xlsx · csv · md
- Cost
- Free, no sign-up
- From the guide
- Search Console regex: 15 filters worth saving
The whole template, on one page.
The downloads hold exactly this. Jump to a section from the list.
Search Console regex cheat sheet
0115 regex filters
Replace the example brand (Northwind) and the cities with your own. Test each pattern on real queries before you trust the numbers.
| # | Filter | Pattern | Finds | Watch out for |
|---|---|---|---|---|
| 1 | Query, matches | ^(who|what|when|where|why|how|which|can|does|is|are|should)\b | Questions | Questions phrased later in the query ("tap repair how to") slip through |
| 2 | Query, matches | (\S+ ){5}\S+ | Long-tail queries of 6+ words | Change {5} to tune the length; it counts words, not characters |
| 3 | Query, doesn't match | north ?wind|nortwind|northwnd | Everything except your brand (example brand: Northwind) | Add misspellings and product names; check the result for leftovers |
| 4 | Query, matches | \b(vs|versus|alternatives?|compare|comparison)\b | Comparisons and alternatives | "or" comparisons ("notion or obsidian") are too noisy to include |
| 5 | Query, matches | \b(prices?|pricing|costs?|cheap(est)?|how much|fees?)\b | Price and cost searches | Without \b, "costume" and "priceless" sneak in |
| 6 | Query, matches | near me|nearby|open now|\b(in|near) (leeds|york|hull)\b | Local intent | Replace the cities with yours; a city alone also catches non-local queries |
| 7 | Query, matches | \b20[0-9]{2}\b | Queries with a year | Also catches model numbers and room numbers like "2050" |
| 8 | Query, matches | ac+om+odation | A word and its misspellings | Includes the correct spelling; pair it with an exact filter to isolate the errors |
| 9 | Query, matches | \b[a-z]{1,3}-?[0-9]{3,}[a-z0-9]*\b | Product codes and model numbers | Adjust to your SKU format; generic codes like "mp300" overlap with ordinary words |
| 10 | Page, matches | /(blog|guides)/[^/]+/?$ | Articles one level deep in two folders | Skips the folder's index page and pagination like /blog/page/2/ |
| 11 | Page, matches | [?&](utm_[a-z]+|sort|sessionid|ref)= | URLs with tracking or sorting parameters | Use \? alone to see every URL with a query string |
| 12 | Query, matches | \b(how to|guide|tutorial|step by step|examples?|templates?)\b | How-to and resource intent | "guide" won't match "guidelines" because of \b; add it if you want it |
| 13 | Query, matches | \b(buy|order|for sale|deals?|coupon|discount|promo code)\b | Buying intent | "order" also appears in informational queries ("order of operations") |
| 14 | Query, matches | \b(not working|error|fix|broken|problems?|won'?t|can'?t)\b | Problems and troubleshooting | Good for support content; spot-check for product names containing "fix" |
| 15 | Page, matches | (?-i)[A-Z] | URLs with capital letters | Needs (?-i); without it, every URL matches |
02Syntax
| Syntax | Meaning | Example | Matches |
|---|---|---|---|
a|b | Either side | vs|versus | "notion vs obsidian" |
^ and $ | Start and end of the text | ^how | "how to…", not "know how" |
\b | Word boundary | \bcost\b | "roof cost", not "costume" |
?, +, {n} | Optional, one or more, exactly n | prices? | "price" and "prices" |
[...] and . | One character from a set, any character | 20[0-9]{2} | "2026" |
03How the filter behaves
- The dialect is RE2: no lookahead, lookbehind or back-references. Use "Doesn't match regex" for exclusions.
- Matching is partial: a pattern matches anywhere in the query or URL. Anchor with ^ and $ when position matters.
- Matching ignores case by default. Start the pattern with (?-i) to make it case-sensitive.
- The Page filter sees the full URL, protocol and host included: use /blog/, not ^/blog.
- RE2's \b is ASCII-only: letters like é or ü count as non-word characters.
- Query filters drop anonymized queries, so a filter and its "doesn't match" twin won't add up to the unfiltered total.
04Your saved patterns
Search Console has no library of saved filters. Keep one canonical version of each pattern here, especially the brand exclusion.
| Name | Filter | Pattern | What it's for |
|---|---|---|---|
The .xlsx, .csv and .md downloads contain the same content.
How to use it.
4 steps, start to finish.
- 01
Collect real examples
Five queries the pattern should catch and five it shouldn't, from your own Queries tab.
- 02
Test outside Search Console
Use an RE2-based tester. A subtly wrong pattern doesn't fail loudly; it just returns the wrong rows.
- 03
Apply it
Performance > Search results > + Add filter > Query (or Page) > Custom (regex) > Matches regex (or Doesn't match regex), paste, Apply.
- 04
Read the table, then save it
Scan the top rows for false hits and the "doesn't match" version for misses, tighten the pattern, then add it to the Saved patterns sheet.
With Serplyze
Reuse these patterns in Serplyze
Serplyze reads the same Search Console data and runs regex on RE2, case-insensitive like Search Console. Table filters on screens such as Traffic and Content decay take "matches regex" and "does not match regex", rule-based keyword groups and page groups fill themselves from a pattern, and brand terms accept regexes. Patterns are capped at 200 characters.
Questions.
RE2, Google's regex engine. It runs in linear time and doesn't support lookahead, lookbehind or back-references, so patterns copied from JavaScript or PCRE testers can fail.
No, matching ignores case by default. Start the pattern with (?-i) to make it case-sensitive, which matters more for URLs than for queries.
Add a Query filter, choose Custom (regex) and "Doesn't match regex", and list your brand variants and misspellings joined with |. Where Search Console offers the branded queries filter, compare its result with your regex.
The Page filter matches the full URL, including https:// and the host. Use /blog/ or anchor on the full origin, such as ^https://www\.example\.com/blog/.
More free templates.
All templates- Report
Monthly SEO report template
Nine sections that answer what happened, why, and what you do next, in under five minutes of reading.
Open the template - Brief
Content brief template
Turn a cluster of Search Console queries into a brief a writer can act on, with a success check set before you publish.
Open the template - Checklist
SEO audit checklist
Nine Search Console checks, in order, with where to click and what counts as a finding. One hour a month.
Open the template