These are the Search Console regex filters we actually reuse, grouped by the question they answer. Each one is written for RE2, the syntax Search Console uses, so none of them rely on lookaheads or backreferences that Google will not run. Swap in your own words, test the pattern in the free GSC regex builder, then paste it into the Performance report.
Where to paste a regex in Search Console
- Open Performance → Search results.
- Click + Add filter and choose Query or Page.
- Choose Custom (regex).
- Pick Matches regex or Doesn't match regex in the second dropdown.
- Paste the pattern and click Apply.
Four rules from Google's filtering documentation explain most surprises:
- Partial match by default.
seomatches "seo tools" and "best seo". Anchor with^(start) and$(end) when you mean the whole string. - Case-insensitive by default. Start with
(?-i)when case matters, for example in URL paths. - "Not" is a dropdown, not syntax. RE2 has no negative lookahead. Use Doesn't match regex instead.
- Several values go in one group.
(one|two|three).
Patterns are commonly reported to be capped at 4,096 characters, which is plenty unless you paste a whole keyword list.
Brand and non-brand
Replace acme with your brand, its misspellings and its product names.
acme|akme|acmeewith Matches regex: Brand queries, including common misspellings.acme|akme|acmeewith Doesn't match regex: Non-brand queries (same pattern, other dropdown).acme ?(login|sign in|app)with Matches regex: Navigational brand queries you can usually ignore for SEO.^acme$with Matches regex: The bare brand query only.
Why split them: brand clicks rise and fall with marketing, not with rankings. Non-brand is the number that tells you whether SEO is working. Keep the brand pattern in one place and reuse it every month, or the split drifts as you add product names.
Questions and intent
^(who|what|when|where|why|how|which|can|does|do|is|are|should)\s: Queries that start with a question word.\?$: Queries typed with a question mark.\b(vs|versus|compared to|comparison)\b: Comparison queries.\b(alternative|alternatives|competitor|competitors)\b: "Alternatives to X" queries.\b(best|top|review|reviews|rated)\b: Commercial research queries.\b(price|pricing|cost|cheap|free|discount|coupon)\b: Price-sensitive queries.\b(how to|tutorial|guide|example|examples|template)\b: How-to and learning queries.\bnear me\b: Local-intent queries.
Question queries are the fastest source of FAQ headings that match how people search. Comparison and alternatives queries are usually where a small site can beat a big one, because the big site will not write "us vs them".
Long-tail and query length
^(\S+\s+){4,}\S+$: Queries of five words or more.^\S+$: One-word queries.^(\S+\s+){1,2}\S+$: Two- and three-word queries.20(2[4-9]): Queries that mention a year from 2024 to 2029.
Pattern 13 is the long-tail filter. Sort the result by impressions and look for queries where you rank between 4 and 20. Those are the cheapest wins on most young sites, and our striking-distance view does the same job from a CSV export.
Pages, folders and URL patterns
Page filters match the full URL, including https:// and the host, so anchor carefully.
/blog/with Matches regex: Every page in the blog folder./(blog|guides|resources)/with Matches regex: Several content folders at once./(blog|guides)/with Doesn't match regex: Everything except content (product, home, landing pages).^https://www\.example\.com/[^/]+/?$with Matches regex: Top-level pages only, one folder deep.\?with Matches regex: URLs with any query string (often duplicates worth canonicalising).[?&](utm_|gclid|fbclid)with Matches regex: Tracking parameters that leaked into Google's index.\.pdf$with Matches regex: PDF files ranking in search./product/[0-9]+with Matches regex: Product pages with numeric ids.(?-i)/[A-Z]with Matches regex: URLs containing capital letters, a common duplicate source.
Pattern 22 is worth running once a quarter. If campaign URLs are getting impressions, your canonical tags are not doing their job. How campaign tags should behave: UTM tracking without cookies.
Patterns that fail in Search Console
These work in many online testers but not in Search Console, because RE2 does not support them:
| Looks like | Example | Use instead |
|---|---|---|
| Negative lookahead | ^(?!.*acme).*$ |
Pattern 2: the brand list with Doesn't match regex |
| Lookbehind | (?<=/blog/).* |
/blog/.+ |
| Backreference | (\w+) \1 |
Write the repeated word out |
| Possessive or atomic group | a++, (?>a) |
Plain a+ |
If a filter returns no rows at all, check for one of these first, then check whether you anchored a page pattern without the https:// part.
Combining filters
Search Console lets you stack filters. Two common pairs:
- Non-brand questions: Query filter with pattern 2 (Doesn't match), plus a second Query filter with pattern 5 (Matches).
- Long-tail in one folder: Page filter with pattern 17, plus Query filter with pattern 13.
Stacked filters are an AND. For an OR, put both alternatives into one pattern with |.
When a regex filter is not enough
Regex filters work on whatever Search Console still holds, which is 16 months, and on what the UI shows you, which is 1,000 rows per table. If you run the same brand split or folder comparison every month, you will hit both limits:
- Data older than 16 months is gone for good. When Google deletes Search Console data and the data expiry calculator show the date for your oldest day.
- Exports stop at 1,000 rows. Workarounds: export more than 1,000 rows.
SiteLine keeps a Search Console archive (about 16 months backfilled on connect, up to 25k rows per day per report, kept while you subscribe) so the same filters still work on last year's data. It also exposes that archive to agents over read-only MCP. Start a 7-day trial, no card · pricing from $4.99/mo.
FAQ
What regex syntax does Google Search Console use?
RE2, Google's regular expression library. It supports alternation, character classes, anchors, \s, \S, \d, \b and repetition counts like {4,}. It does not support lookarounds, backreferences or possessive quantifiers.
Is Search Console regex case-sensitive?
No. Matching is case-insensitive by default. Put (?-i) at the start of the pattern to make it case-sensitive.
How do I exclude queries with regex in Search Console?
Write the pattern for what you want to exclude, then pick Doesn't match regex in the second dropdown. Do not try to build the exclusion into the pattern with (?!...); RE2 rejects it.
How do I filter for long-tail keywords in Search Console?
Use ^(\S+\s+){4,}\S+$ as a Query filter with Matches regex. It keeps queries of five or more words. Change the 4 to 3 for four-word queries and up.
Why does my regex return no data?
Usually one of three things: an unsupported construct such as a lookahead, a page pattern anchored with ^ but missing https:// and the host, or a date range with no matching rows. Test the pattern against real rows in the regex builder first.
Can I use regex in the Search Console API?
Yes. The Search Analytics API accepts includingRegex and excludingRegex as dimension filter operators, with the same RE2 rules.