Missed Clicks
Free striking distance keywords tool for Google Search ConsoleNo sign-up · Runs in your browser
Free tool · RE2 safe

Search Console regex generator

Pick what you want to find, such as question queries, everything except your brand, or every page in a folder. Copy the expression, paste it into Search Console, and test it on your own queries first.

FilterDIMENSIONQueryFILTER TYPECustom (regex)CONDITIONMatches regexREGULAR EXPRESSION^(who|what|how|why)\bAPPLYpastehere
Performance → Add filter → Query → Custom (regex).

Regex generator

Your regex
^(who|what|when|where|why|how|which|can|does|do|is|are|should)\b
64 characters

In Search Console: Performance → Add filter → Query → Custom (regex) → Matches regex

Queries that start with a question word.

  • how to make espresso — matches
  • what is cold brew — matches
  • espresso machine — no match
  • is arabica stronger than robusta — matches
  • best coffee grinder — no match

3 of 5 match

What a regex filter does in Search Console

The Performance report can filter queries and pages by a regular expression, a short pattern that describes many values at once. Instead of filtering for one query that contains "how", you can ask for every query that starts with any question word, or leave out every query that mentions your brand.

To use it, open Performance → Search results, click Add filter, choose Query or Page, then Custom (regex). Keep Matches regex to include what the pattern finds, or switch to Doesn't match regex to exclude it. Google added regex filters in April 2021 and the exclude option in June 2021.

Three rules decide how a pattern behaves. Search Console uses the RE2 syntax. Matching is partial, so a pattern matches anywhere in the query or URL unless you anchor it with ^ at the start or $ at the end. And matching ignores upper and lower case unless the expression starts with (?-i). The generator above follows all three.

10 regex filters worth saving

Each one works as it is. Replace the example words with your own.

  1. Question queries

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

    Query · Matches regex

    Queries that start with a question word. These are the questions your pages already show up for, and the best source for FAQ sections and new articles.

  2. Everything except your brand

    \b(acme|acme coffee|acmecoffee)\b

    Query · Doesn't match regex

    Removes brand searches, which have a much higher CTR and hide how generic queries perform. Add common misspellings of the brand.

  3. Long-tail queries (5+ words)

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

    Query · Matches regex

    Specific searches with five or more words. They usually have less competition and clearer intent.

  4. Comparison queries

    \b(vs|versus|or|compared to|alternatives?)\b

    Query · Matches regex

    People choosing between options. A good signal for comparison pages and tables.

  5. Buying intent

    \b(best|top|reviews?|price|cheap|buy|deals?|discount)\b

    Query · Matches regex

    Searches from people close to a purchase. Check which pages rank for them and whether those pages sell.

  6. Pages in a folder

    ^https?://[^/]+/blog/

    Page · Matches regex

    Every URL under /blog/, on any subdomain and protocol. The page filter matches the full URL, so the folder alone also works, but this version cannot match /shop/blog-gift-set by accident.

  7. An exact list

    ^(espresso machine|coffee grinder|french press)$

    Query · Matches regex

    Exactly these queries and nothing that only contains them. The ^ and $ turn the default partial match into an exact one.

  8. Queries with a year

    \b20[0-9]{2}\b

    Query · Matches regex

    Searches that include a year, such as "best espresso machine 2026". Pages that rank for them need a visible, current date.

  9. Local searches

    \b(near me|nearby|open now)\b

    Query · Matches regex

    Searches with local intent. If you have a physical location, these belong on the location page, not the blog.

  10. URLs with parameters

    \?

    Page · Matches regex

    Any URL that contains a question mark. Parameter URLs in search results often point to duplicate pages that need a canonical tag.

Limits and what to do instead

No lookahead or lookbehind. RE2 does not support (?=…), (?!…), (?<=…) or (?<!…), nor backreferences like \1. Most patterns copied from other tools fail because of these. To exclude something, use Doesn't match regex instead of a negative lookahead.

One condition per expression. A single regex cannot say "contains A but not B" without a lookahead. Filter on one condition in Search Console, export, and finish the rest in a spreadsheet or in Missed Clicks, which can leave out brand words for you.

Escape what is literal. A dot means "any character", so example.com also matches example-com. Write example\.com. The generator escapes your words automatically.

Length. The help pages do not give a limit for the report. The Search Console API caps a filter expression at 4,096 characters, so very long lists of URLs are safer split into two filters.

Silent failures. An invalid expression can simply return no rows. If a filter shows nothing, paste a few real queries into the tester above before you assume there is no data.

Use it with Missed Clicks

Filters apply to the whole report, so an export made with a filter contains only the matching data. That lets you analyze one kind of search at a time:

  1. Add the question queries filter above in Search Console.
  2. Export the report (every export method compared).
  3. Drop the file into Missed Clicks. You now see which question queries are close to the top 3 and how many clicks they could bring.

The same works with the brand exclusion filter, which gives a cleaner picture of how your pages do on generic searches.

Frequently asked questions

Is Search Console regex case sensitive?

No. Google states that default regex matching is not case-sensitive. To make it case-sensitive, put (?-i) at the start of the expression: (?-i)AAA matches /AAA but not /aaa.

Why is my regex not working?

The usual causes: a lookahead or lookbehind such as (?=...) or (?!...), which RE2 does not support; an unescaped dot in a URL; ^ or $ where you meant a partial match; or a page filter written for the path when Search Console matches the full URL. Invalid syntax can return no results instead of an error, so test the expression before you rely on it.

Can I use regex for pages?

Yes. In the Search results report, regex works on the Query and Page dimensions. For pages, the expression is matched against the full URL, including https:// and the host.

What regex syntax does Search Console use?

RE2, the same syntax used by Google Analytics and Looker Studio. It supports alternation, character classes, \b word boundaries and {n,m} counts, but not lookarounds, backreferences or possessive quantifiers.

Is there a length limit for regex filters?

The Search Console help pages do not state one. The Search Console API limits a filter expression to 4,096 characters, so keep long lists below that or split them into two filters.