Where the regex filter is
In Search Console, open Performance, click + Add filter (or New), choose Query or Page, then pick Custom (regex). You can choose Matches regex or Doesn't match regex.
- Search Console uses RE2 syntax. Lookaheads and backreferences are not supported.
- Matching is not case-sensitive by default. Start the expression with
(?-i)to make it case-sensitive. - A pattern matches anywhere in the query or URL unless you anchor it with
^(start) or$(end). - A pattern with a syntax error returns no rows rather than an error, so an empty table can mean a typo.
Patterns worth saving
| Use | Filter | Pattern | What it shows |
|---|---|---|---|
| Question queries | Query, matches | ^(who|what|when|where|why|how|which|can|does|is|are|should)\b | Queries phrased as questions: good material for FAQ sections and headings. |
| Brand vs non-brand | Query, doesn't match | mowteng|mow teng|milowda | Everything except your brand and its misspellings, so growth from new searchers is visible. Replace with your own names. |
| Long-tail queries | Query, matches | ^(\S+\s+){4,}\S+$ | Queries of five words or more. |
| Comparison intent | Query, matches | \b(vs|versus|alternative|alternatives|compare|comparison)\b | People choosing between products. |
| Buying intent | Query, matches | \b(best|top|review|reviews|pricing|price|cost|cheap)\b | Queries close to a decision. |
| One folder | Page, matches | ^https://example\.com/blog/ | Only pages under /blog/. Escape the dots. |
| A few pages at once | Page, matches | /(pricing|features|signup)/?$ | Several exact pages without adding filters one by one. |
| URLs with parameters | Page, matches | \? | Pages reached with a query string, which often point to duplicate URLs. |
Combine a regex filter with a date comparison to see which group moved: for example, non-brand question queries, last 28 days against the 28 days before.
Let your assistant write and run the pattern
Regular expressions are easy to get almost right. With mowteng connected, you describe the group in words, and your assistant writes the pattern and runs it through gsc_search_analytics, which accepts includingRegex and excludingRegex filters on queries and pages. You see the rows, and the pattern it used, in the same answer.
For example.com, show question queries from the last 28 days that don't mention my brand, sorted by impressions. Show the regex you used.
Compare clicks for pages under /blog/ between the last 28 days and the 28 days before, and list the five pages that dropped most.
The same filters work in the date comparison and help narrow striking distance or cannibalization checks to one part of the site.
Common mistakes
- Unescaped dots. In
example.comthe dot matches any character. Writeexample\.com. - Missing anchors.
/blogalso matches/old-blog-posts. Use^https://example\.com/blog/. - Too many alternatives. A long list of words is hard to check. Split it into two filters or two questions.
- Reading anonymized queries as missing. Search Console hides rare queries for privacy, so a query filter never adds up to the site total.