Google Search Console regex is the Custom (regex) option in the Performance report’s Query and Page filters. It lets you match or exclude queries and URLs with a regular expression instead of a single “contains” word. Search Console uses Google’s RE2 syntax, matches anywhere in the string unless you anchor it, and ignores letter case by default. That’s the whole rulebook in one sentence.
Everything below is built around one idea. A pattern is only useful if you can see what it catches and what it skips, so every filter comes with both. I checked each pattern against RE2’s rules, which means no lookaheads, no lookbehinds and no backreferences anywhere on this page.
How Do You Use Regex in Google Search Console?
Here’s how to use regex in Google Search Console, start to finish. It takes about ten seconds once you’ve done it twice.
- Open Performance, then Search results.
- Click + Add filter and choose Query or Page.
- Switch the dropdown to Custom (regex).
- Pick Matches regex or Doesn’t match regex.
- Paste the pattern and click Apply.
Google’s help page on advanced filtering and comparison confirms that regex works on the Queries and Pages dimensions only. Countries, devices and search appearance use their own pickers.
Google Search Console Regex Rules That Break Copied Patterns
Most regex you find in forums was written for JavaScript, Python or PCRE. RE2 is stricter, so a pattern that works fine in an online regex tester can fail or behave differently inside Search Console. These are the rules I check before pasting anything.
| Rule | What it means in practice | Example |
|---|---|---|
| Partial match by default | A pattern matches anywhere unless you add ^ or $ | seo matches “local seo agency” |
| Case-insensitive by default | Add (?-i) at the start for case-sensitive matching | (?-i)[A-Z] finds uppercase letters |
| No lookarounds | (?=, (?!, (?<= and (?<! are not supported | Use “Doesn’t match regex” instead |
| No backreferences | \1 and friends are not supported | Write both alternatives out in full |
\b and \w are ASCII only | They don’t see letters in Bangla, Hindi or Arabic | Use a Unicode range such as [\x{0980}-\x{09FF}] or \p{L} |
That last row matters more than people think. The RE2 syntax reference defines \b as an ASCII word boundary, so a \b pattern built for English queries quietly fails on queries typed in Bangla script. If your site gets searches in two scripts, test both.
Query Patterns for Keyword Research
These 14 filters go on the Query dimension. I use them when I want to find content ideas, split intent, or clean brand noise out of a report.
1. Question Queries
^(how|what|why|when|where|who|which|can|does|is|are|should)\s
This catches queries that start with a question word, which are ready-made headings for articles or FAQ answers. It matches “how to use regex in google search console” and “is seo dead”, and skips “seo how to” because the ^ anchors the question word to the start.
2. Brand Queries (Use Doesn’t Match Regex)
sky\s?rank
Swap in your own brand and its common misspellings. Set it to Doesn’t match regex and you get non-brand queries only, which is the report I actually care about. It removes “skyranko”, “sky ranko seo” and “skyrank” in one go, and I turn the same split into a permanent brand vs non-brand chart in my Search Console dashboard guide for Looker Studio.
3. Long-Tail Queries of Five Words or More
^(\S+\s+){4,}\S+$
Four or more word-plus-space chunks followed by one final word means five words minimum. It matches “what is the best seo strategy for product category pages?” and skips “category page seo”. Long queries like these are where small sites usually win first.
4. Short Head Terms of One or Two Words
^\S+(\s+\S+)?$
The mirror of pattern 3. It keeps “seo” and “keyword research” and drops “keyword research tool”. I run it to see which broad terms a page already gets impressions for, even when it sits on page three.
5. Comparison Queries
\b(vs|versus|alternatives?|compar(e|ed|ison))\b
It matches “ahrefs vs semrush”, “semrush alternatives” and “compare seo tools”. People searching like this are close to a decision, so these queries often deserve their own comparison page.
6. Commercial Modifiers
\b(best|top|reviews?|cheap|pric(e|es|ing)|cost|buy)\b
This pulls buying-intent queries such as “best seo tools” and “how much does seo cost”. The word boundaries stop “stop words seo” from sneaking in through “top”.
7. Service and Hiring Queries
\b(services?|agency|company|companies|hire|consultants?)\b
Great for service businesses. It matches “local seo services” and “hire seo expert”. If Search Console shows these queries landing on a blog post instead of the service page that should own them, you’ve found an internal linking job, and usually a quick one.
8. Local Intent
near ?me|nearby|\b(dhaka|rajshahi|sylhet)\b
Replace the city names with your own service area. It catches “seo agency near me”, “seo nearme” and “seo expert rajshahi”, and skips “seo in bangladesh” because the country isn’t in the list.
9. Queries With a Year
\b20[2-3][0-9]\b
It matches any year from 2020 to 2039, so “seo trends 2026” shows up and “iphone 12” doesn’t. I run it every January, because a post still ranking for last year’s number in its title is quietly losing clicks to whichever competitor updated first. Easy fix.
10. British and American Spellings Together
optimi[sz](e|es|ed|ing|ation)
One pattern covers “optimise”, “optimization”, “optimising” and the rest. It found “category pages optimisation” in one of my own reports, a query a plain “contains optimization” filter would have missed.
11. An Exact List of Queries
^(seo audit|site audit|website audit)$
The ^ and $ turn partial matching into exact matching. It shows “seo audit” but not “free seo audit”. This is the cleanest way to track a fixed keyword set without a rank tracker.
12. Two Words in Any Order
(shopify.*seo|seo.*shopify)
RE2 has no lookaheads, so you can’t write “contains shopify AND contains seo” the usual way. Writing both orders out works. It matches “shopify seo” and “seo for shopify stores” and skips “shopify themes”.
13. Queries Typed in Bangla Script
[\x{0980}-\x{09FF}]
That range is the Unicode block for Bengali script, U+0980 to U+09FF, so the filter matches any query with at least one Bangla character. For a Bangladeshi business it answers a real question: how much search demand arrives in Bangla rather than in English? Swap in [\x{0900}-\x{097F}] for Devanagari or [\x{0600}-\x{06FF}] for Arabic if that’s your market.
14. Guide, Template and Checklist Queries
\b(examples?|templates?|checklists?|guide|tutorial)\b
It catches “topical map examples” and “seo checklist”. Readers who type these want a format, not just an answer, so the page that ranks should deliver that format. A wall of text won’t satisfy “template”.
Page Patterns for Site Sections
The last 6 filters go on the Page dimension. Page URLs in Search Console are full URLs, including https:// and the domain. Forget that, and an anchored pattern like ^/blog/ will match nothing at all.
15. One Folder Only
^https://www\.example\.com/blog/
Every page inside /blog/ and nothing else. Note the escaped dots: \. means a literal dot, while a bare . means any character.
16. A Hand-Picked Group of Pages
/(seo-service|local-seo|keyword-research)/$
I use this to watch a set of money pages as one line on the chart, which is far easier to read in a monthly report than three separate page filters and three screenshots. One line. One trend. The trailing /$ stops /local-seo-checklist/ from matching when you only wanted /local-seo/.
17. URLs With Parameters
\?
Any URL with a query string. If filtered or tracked URLs show up here with impressions, check your canonicals. On a store, this usually points straight at filter URLs.
18. Paginated URLs
/page/\d+/?$|[?&]page=\d+
It matches WordPress-style /page/3/ and store-style ?page=2, and skips /page-speed/. If you run a shop, my guide to category page SEO explains how paginated category URLs should behave.
19. Top-Level Pages Only
^https://[^/]+/[^/]+/?$
This keeps URLs exactly one level below the domain, like /about/, and drops the homepage and deeper paths like /blog/post/. On a site where posts live at the root, it’s a fast way to separate them from nested pages.
20. URLs With Uppercase Letters
(?-i)[A-Z]
The (?-i) flag switches off Search Console’s default case-insensitivity. Now the filter finds /About-Us/ and skips /about-us/. Mixed-case URLs often mean a duplicate is getting impressions next to the lowercase version.
Why Did My Totals Drop After Adding a Regex Filter?
This one confuses almost everyone. Google leaves anonymized queries, the rare ones searched by very few people, out of the query table. Once you filter by query, they vanish from the chart totals as well.
Google’s Search Central blog explained this in October 2022 with a worked example: queries containing “fiction” showed 175 clicks, queries not containing it showed 275, yet the unfiltered chart showed 550 clicks. The missing 100 clicks were anonymized queries. So a query filter will almost always show lower totals than the unfiltered report, and that’s expected.
Google’s explanation ties this to query filters. So when I need a section total I can trust, I filter by Page, not Query.
What If RE2 Can’t Express the Filter You Need?
Honestly, it happens. Three workarounds cover nearly every case I run into.
Flip the logic. Instead of “match everything except X” with a negative lookahead, put X in Doesn’t match regex. Pattern 2 works exactly this way.
Split across dimensions. Put the topic on Query and the folder on Page. “Queries matching shopify on pages matching /blog/” needs two simple filters, not one clever one.
Export and finish elsewhere. The interface exports at most 1,000 rows, while Google says the API can return up to 50,000 rows per day per site per search type. When a regex still leaves too much, I export and finish the job in a spreadsheet, or pull the data through the Search Console API for larger sites.
How I Put These Patterns to Work Each Month
My monthly routine is short. I run pattern 2 to drop brand noise, then patterns 1 and 3 to pull questions and long-tail queries, then pattern 7 to check that service queries land on service pages.
The regex only finds the queries. What you do with them is a separate job. My guide to Google Search Console keyword research turns those queries into new pages, and my post on low hanging fruit keywords shows which ones to push first.
If you’d rather hand the whole reporting loop to someone else, that’s part of our complete SEO service. You can also request a free SEO audit and I’ll point out which of these filters would tell you the most about your site.
Regex Cheat Sheet
| # | Filter on | Pattern | Finds |
|---|---|---|---|
| 1 | Query | ^(how|what|why|when|where|who|which|can|does|is|are|should)\s | Questions |
| 2 | Query (doesn’t match) | sky\s?rank | Non-brand queries |
| 3 | Query | ^(\S+\s+){4,}\S+$ | Five or more words |
| 4 | Query | ^\S+(\s+\S+)?$ | One or two words |
| 5 | Query | \b(vs|versus|alternatives?|compar(e|ed|ison))\b | Comparisons |
| 6 | Query | \b(best|top|reviews?|cheap|pric(e|es|ing)|cost|buy)\b | Commercial intent |
| 7 | Query | \b(services?|agency|company|companies|hire|consultants?)\b | Hiring intent |
| 8 | Query | near ?me|nearby|\b(dhaka|rajshahi|sylhet)\b | Local intent |
| 9 | Query | \b20[2-3][0-9]\b | Years |
| 10 | Query | optimisz | Spelling variants |
| 11 | Query | ^(seo audit|site audit|website audit)$ | Exact list |
| 12 | Query | (shopify.*seo|seo.*shopify) | Both words, any order |
| 13 | Query | [\x{0980}-\x{09FF}] | Bangla script |
| 14 | Query | \b(examples?|templates?|checklists?|guide|tutorial)\b | Format intent |
| 15 | Page | ^https://www\.example\.com/blog/ | One folder |
| 16 | Page | /(seo-service|local-seo|keyword-research)/$ | Page group |
| 17 | Page | \? | Parameter URLs |
| 18 | Page | /page/\d+/?$|[?&]page=\d+ | Pagination |
| 19 | Page | ^https://[^/]+/[^/]+/?$ | Top-level pages |
| 20 | Page | (?-i)[A-Z] | Uppercase URLs |
Frequently Asked Questions
Does Google Search Console Regex Support Lookaheads?
No. Search Console uses RE2, and RE2 doesn’t support lookaheads, lookbehinds or backreferences. Use the Doesn’t match regex option for exclusions, and write both word orders out when you need two terms in one query.
Is Regex in Google Search Console Case-Sensitive?
Not by default. Google’s help page says matching ignores case unless you start the pattern with (?-i). I mostly use that flag on Page filters, where a capital letter in a URL can point to a duplicate page.
Why Does My Regex Return No Results?
Check three things first. A pattern with unsupported syntax such as (?! won’t work, a stray ^ or $ can make a match impossible, and a Page pattern must account for the full URL, including https://.
Can I Save Regex Filters in Search Console?
Not as a named library inside the Performance report. I keep my patterns in a plain text file and paste them in when I need them, which takes seconds and means the list travels with me across every property I manage.
Last updated: September 2026 by Mizanur Rahman



