Google Search Console regex filter tester
Search Console filters use RE2-compatible regular expressions. Paste a pattern and example queries or page URLs to see which ones match before you apply the filter.
What does a Search Console regex filter do?
A Search Console regex filter keeps only the queries or pages whose text matches a regular expression. In the Performance report, open Search results, choose the Queries or Pages tab, click Add filter, pick Query or Page, choose Matches regex or Does not match regex, and enter the pattern. The filter then applies to the table and the chart.
Search Console uses RE2-compatible syntax, not the full JavaScript regular expression language. RE2 supports anchors, character classes, alternation, groups and quantifiers, but it does not support lookahead, lookbehind, backreferences, atomic groups or possessive quantifiers. The tester below checks for those limits before it tests your examples.
Test a Search Console regex filter
Choose the filter type, enter a pattern, and add one example query or page URL per line. The tester shows which examples match the regex and which would be included by the filter.
Everything runs in your browser. No example is uploaded or stored.
Enter a pattern and examples to see matches.
Common query and page filters
These patterns cover the filters people use most often in the Performance report. Load one above, then replace the example values with your own.
| Goal | Filter | Pattern | Example match |
|---|---|---|---|
| Query contains a word | Query matches regex | best | best seo tools |
| Query starts with how | Query matches regex | ^how | how to use search console |
| Query ends with price | Query matches regex | price$ | seo tool price |
| Query is exactly one phrase | Query matches regex | ^seo tools$ | seo tools |
| Query contains any of three words | Query matches regex | (cheap|budget|affordable) | cheap seo tools |
| Page URL contains /blog/ | Page matches regex | /blog/ | https://example.com/blog/seo-guide |
| Page URL ends with .html | Page matches regex | \.html$ | https://example.com/about.html |
| Page URL is the homepage | Page matches regex | ^https://example\.com/?$ | https://example.com/ |
| Page URL contains a category | Page matches regex | /category/ | https://example.com/category/seo |
RE2 syntax: what works and what does not
RE2 is a regular expression engine designed for fast, predictable matching. It covers the syntax most filters need, but it deliberately leaves out features that can make matching slow or ambiguous.
Supported in RE2
- Anchors:
^for the start and$for the end. - Character classes:
[abc],[^abc],\d,\wand\s. - Groups and alternation:
(seo|search). - Quantifiers:
*,+,?and{2,4}. - Inline flags such as
(?i)for case-insensitive matching.
Not supported in RE2
- Lookahead:
(?=...)and(?!...). - Lookbehind:
(?<=...)and(?<!...). - Backreferences:
\1and\k<name>. - Atomic groups:
(?>...). - Possessive quantifiers:
*+,++and?+.
If a pattern uses one of the unsupported features, the tester stops and names the construct instead of returning a misleading result.
How to apply the pattern in Search Console
- Open Performance > Search results in Google Search Console.
- Choose the Queries or Pages tab.
- Click Add filter, then choose Query or Page.
- Choose Matches regex or Does not match regex.
- Paste the pattern and apply the filter. Check the date range and the other filters before you read the numbers.
Search Console filters the report; it does not change your site or your rankings. To turn the filtered rows into a spreadsheet, follow the guide to exporting data from Google Search Console. For a wider look at the report, read the Google Search Console guide.
Frequently asked questions
What regex syntax does Google Search Console use?
Search Console uses RE2-compatible regular expressions. RE2 supports anchors, character classes, alternation, groups and quantifiers, but it does not support lookahead, lookbehind, backreferences, atomic groups or possessive quantifiers. This tester flags those unsupported constructs before it tests your examples.
Does a Search Console regex match the whole query or part of it?
It matches anywhere in the string unless you anchor the pattern. Use ^ at the start and $ at the end for an exact match, such as ^seo tools$. Without anchors, the pattern best also matches best seo tools and the best keyword research.
Is the Search Console regex filter case-sensitive?
Search Console's RE2 engine is case-sensitive by default. RE2 supports the inline flag (?i) for case-insensitive matching, and this tester also has an Ignore case checkbox that applies the same idea locally.
Can I use regex to exclude pages or queries?
Yes. In Search Console, choose Does not match regex instead of Matches regex. This tester has the same two modes, so you can see which examples would be included and which would be excluded.
Why does my pattern show an RE2 error?
The most common causes are lookahead (?=...), lookbehind (?<=...), backreferences such as \1, atomic groups (?>...) and possessive quantifiers such as *+. RE2 does not support them. Rewrite the pattern with anchors, character classes, alternation or a separate Does not match regex filter.
Does this tool show search volume, clicks or impressions?
No. It only tests whether a pattern matches the examples you type. It does not connect to Search Console, read your property or invent search-volume data.