Search Console Regex Builder
Build and test regex filters for Google Search Console: questions, long-tail queries, brand terms and page groups.
Where to paste it
Test results
How to use the Search Console regex builder
Choose what you want to find and add your terms. The tool writes a regex you can paste into a Search Console filter.
- Pick a filter type, such as questions or long-tail queries.
- Type your terms, one per line.
- Paste sample queries in the test box to check the result.
- Copy the regex.
- In Search Console, add a Query or Page filter and choose Custom (regex).
What is regex in Search Console?
Regex is short for regular expression. It is a pattern that matches text, such as “any query that starts with how”.
Search Console filters accept regex for queries and pages. One pattern can replace dozens of separate filters.
Useful Search Console regex patterns
| Goal | Regex |
|---|---|
| Questions | ^(who|what|where|when|why|how)\b |
| Queries of five words or more | ^([^ ]+ ){4,}[^ ]+$ |
| Any of several terms | price|cost|cheap |
| Starts with a term | ^best |
| Ends with a term | near me$ |
| Brand with spacing variants | oak[ -]?hide |
| Pages in a folder | /blog/ |
| PDF files | \.pdf($|\?) |
The symbols, in plain English
| Symbol | Meaning |
|---|---|
| | Or |
^ | Starts with |
$ | Ends with |
. | Any single character |
.* | Any run of characters |
? | The item before it is optional |
\b | A word boundary |
(?i) | Ignore upper and lower case |
\. | A real full stop |
Limits to know
- Search Console uses RE2 syntax. Lookaheads, lookbehinds and backreferences do not work.
- A regex can be up to 4,096 characters long.
- Matching is partial by default. Use ^ and $ to match the whole query.
- Matching is case sensitive unless you add (?i) at the start.
- There is no “and” operator. Stack two filters, or list the terms in each order.
Ideas for analysis
- Split brand and non-brand clicks with “Matches” and “Doesn’t match”.
- Find question queries to answer in FAQs.
- Find long-tail queries where you rank on page two.
- Compare folders, such as /blog/ against /shop/.
Why this Search Console regex builder is different
Most guides give you patterns to copy and adapt by hand. This tool builds, checks and tests them.
- Twelve filter types for queries and pages.
- A live tester with matches highlighted.
- Checks for RE2 problems and the 4,096 character limit.
- A checker for a regex you wrote yourself.
For Google Analytics filters, use the GA4 Regex Tester. To sort the queries you export, try the Keyword Grouping Tool.
Private by design
The Search Console regex builder runs in your browser. Nothing you type or paste is sent to a server, and there is no sign-up.
Your last settings are saved on this device only. The tool is ready when you come back.
Frequently asked questions
How do I use regex in Google Search Console?
Open the Performance report, add a Query or Page filter, choose Custom (regex) and paste your pattern.
Which regex syntax does Search Console use?
RE2. It is fast, but it has no lookaheads, lookbehinds or backreferences.
How do I filter question queries?
Use ^(who|what|where|when|why|how)\b. The builder writes a longer version for you.
How do I filter long-tail queries?
Choose Long-tail and set the word count. For five or more words the regex is ^([^ ]+ ){4,}[^ ]+$.
How do I exclude brand queries?
Build the brand regex, then choose “Doesn’t match regex” in the filter.
Is Search Console regex case sensitive?
Yes, by default. Add (?i) at the start to ignore case.
What is the character limit?
A regex filter can hold up to 4,096 characters.
Is the builder free?
Yes. It runs in your browser with no sign-up.
Last reviewed 2026-11-30 · How we build and check our tools