Google Search Console regex filters: copyable examples

Copy-and-paste Google Search Console regex filters for questions, brand terms, long queries, folders and URLs, all tested against RE2 syntax.

To use a regex filter in Google Search Console, click + Add filter, choose Queries or Pages, pick Custom (regex), enter your expression and click Apply. Search Console uses RE2 syntax, matches anywhere in the text and ignores case unless you say otherwise. Below are copyable patterns for the jobs founders do most, each tested against a real RE2 engine.

Why regex filters are worth learning

The built-in Queries containing filter takes one piece of text. That's fine for a single word, but real jobs involve groups: every question people type, every spelling of your brand, every page in a folder. A regex lets you describe the group in one line, and Search Console then filters the table and chart to it.

It's also the most flexible way to exclude a group of queries, such as your brand name, without a separate export.

The basics you need

These come straight from Google's advanced filtering and comparison help, which is the page to check if anything below looks different in your account.

  • Syntax: RE2.
  • Partial match by default. Your pattern can match anywhere in the target unless you anchor it. ^ means the start of the text and $ the end.
  • Not case-sensitive by default. Add (?-i) at the start for case-sensitive matching.
  • OR: use |. To use several values, Google says to separate them with a vertical bar and surround the whole expression with parentheses, like (value1|value2|value3).
  • Common pieces: . any single character, [abc] any one of those characters, * zero or more, + one or more, \d a digit, \s whitespace, \S non-whitespace.
  • Include or exclude: the filter has Matches regex (the default) and Doesn't match regex.

Two notes on the data. Google says filtering by query can change totals, because anonymised queries are left out and the table is limited to 1,000 rows. And when you filter by a query pattern, anonymised queries drop out of the chart totals too, so don't expect filtered totals to add up to the unfiltered total. More on this in Google's dimensions and data groupings page.

How to apply a regex filter

  1. Open Performance, then Search results.
  2. Click + Add filter.
  3. Choose Queries or Pages.
  4. Choose Custom (regex).
  5. Paste the pattern. Leave Matches regex selected, or choose Doesn't match regex to exclude.
  6. Click Apply.

Copyable query filters

Use these on the Queries filter. Each one was tested: the matches and non-matches shown are real results from an RE2 engine.

Questions

^(who|what|when|where|why|how|which|can|does|is|are|should)\b

Matches queries that start with a question word: "how to find declining pages", "what is CTR". It doesn't match "seo how to" (the question word isn't first) or "island holidays" (\b stops it matching the start of "island"). Questions often show what people really want to know, so this list is a good source of content ideas.

Your brand, in its common spellings

(sense ?console|senseconsole|sense-console)

Swap in your own brand. It matches "sense console login", "senseconsole" and "Sense-Console pricing", but not "search console". The ? makes the space optional. Use it with Matches regex to see branded queries, or Doesn't match regex to see everything else. Google also has a built-in Branded and Non-branded query filter, but it isn't available for sites with a low number of impressions or for sub-properties, so a regex is the fallback for small sites.

Long queries (five or more words)

^(\S+\s+){4,}\S+$

Matches queries with at least five words, such as "how to find keyword cannibalization fast". Long queries are usually specific, which makes them good ones to answer with a dedicated section.

Comparison and buying intent

\b(best|vs|versus|alternatives?|reviews?|compare|comparison)\b

Matches "best seo tools", "semrush vs ahrefs", "ahrefs alternatives", "sense console review". It doesn't match "bestseller list" or "preview mode", because \b requires word boundaries. People searching like this are closer to a decision.

Place words

\b(near me|nearby|london|manchester)\b

Swap in your own towns. Matches "accountant near me" and "seo agency london". Doesn't match "londoner blog".

Searches that include a year

\b20\d\d\b

Matches "best seo tools 2026". It helps you find pages whose searches name a year, so you can check those pages are up to date.

A topic written two ways

(keyword cannibali[sz]ation|cannibali[sz]ing keywords)

The [sz] matches either UK or US spelling. We used this in our guide to finding keyword cannibalisation.

An exact query

^pricing$

Matches only the query "pricing", not "pricing plans" or "our pricing". Without the anchors it would match all three.

Copyable page filters

Use these on the Pages filter.

Everything in one folder

/blog/

Matches any URL containing /blog/, such as https://example.com/blog/post-a, but not https://example.com/blogs or /pricing. It's the quickest way to compare your blog with the rest of the site.

URLs with parameters

\?

The backslash is needed because ? means something special in regex. This matches any URL with a query string, such as https://example.com/shop?colour=red. It's useful for spotting duplicate-looking URLs. Google's guide to canonical URLs explains how to point them at one version.

A short list of exact pages

^https://example\.com/(pricing|features|about)/?$

Matches https://example.com/pricing and https://example.com/about/, but not /pricing/annual or /blog/about. The \. matches a real dot, and /? allows an optional trailing slash.

Pages that are at least two folders deep

^https://[^/]+/[^/]+/[^/]+

Matches https://example.com/blog/post but not https://example.com/pricing or the homepage.

File downloads

\.(pdf|docx?)$

Matches URLs that end in .pdf, .doc or .docx.

URLs with capital letters in the path

(?-i)https://[^/]+/.*[A-Z]

The (?-i) makes it case-sensitive, so [A-Z] only matches real capitals. It matches https://example.com/Blog/post but not https://example.com/blog/post. Mixed-case URLs can lead to duplicate pages if the same content loads at two spellings of the address.

What RE2 doesn't support

Many patterns you'll find online use features RE2 deliberately leaves out. These won't work in Search Console:

  • Lookahead, such as ^(?!.*brand).*$ (excluding a word). Use Doesn't match regex instead.
  • Lookbehind, such as (?<=/blog/)\w+.
  • Backreferences, such as (a)\1.

We confirmed that an RE2 engine rejects all three. If Search Console says your expression is invalid, check for these first.

Common mistakes

  • Forgetting to escape dots and question marks. . matches any character, so example.com also matches exampleXcom. Write example\.com.
  • Forgetting the parentheses around an OR list. Google's instructions put the whole list in parentheses. Keep to that form.
  • Assuming case matters. It doesn't, unless you add (?-i).
  • Using anchors by accident. ^ and $ stop partial matching. That's what you want for exact lists, but not for "contains" patterns.
  • Trusting filtered totals. They can differ from the unfiltered total because anonymised queries are left out.

Where regex filters help next

Regex gets more useful once you know what you're looking for. They're a good fit for finding keyword cannibalisation, for spotting searches with impressions but no clicks in a group, for listing keywords you almost rank for in one folder, for building a control group when you measure whether an SEO change worked, and for the question list in our guide to Google Search Console for founders.

Doing this every week? Sense Console does it automatically

Sense Console doesn't offer regex filters. Its Keywords page shows your top 25 searches for each of five views (Clicks, Impressions, CTR, New and Lost), with the page that gets the most impressions, and the change against the previous 28 days. There's no search box or filter on that page. If you need a custom group such as questions or one folder of your site, the Search Console filters above are still the way. What Sense Console adds is a ranked list of opportunities from the same data, so you don't have to build the filter each week.

Start free. Free plan. No card required.

Frequently asked questions

What regex syntax does Google Search Console use?

RE2. Google's help says so directly. RE2 is a fast, safe flavour that leaves out lookahead, lookbehind and backreferences, so patterns copied from other tools may not work.

Is Search Console regex case-sensitive?

No, by default it is not. Put (?-i) at the start of your expression to make it case-sensitive. For example, (?-i)AAA matches https://example.com/AAA but not https://example.com/aaa.

Do I need ^ and $ in my pattern?

Only when you want to match the whole value. Matching is partial by default, so your pattern can match anywhere in the query or URL unless you anchor it with ^ at the start or $ at the end.

How do I exclude queries instead of including them?

Choose Doesn't match regex in the filter, instead of the default Matches regex. Because RE2 has no negative lookahead, this option is how you exclude a group such as your brand name.

Get a ranked list of what to fix next.

Sense Console reads your Search Console data and tells you which fix matters most. Create a free account and connect your site.

Start free

Free plan. No card required.