Free tool

Build a regex, then see what it catches

Pick patterns, add your own brand and keywords, and test the result against real queries before you paste it into Search Console, GA4 or Looker Studio. Everything runs in your browser. Nothing is uploaded.

Builder

Tick one or more patterns. Ticked patterns are joined with OR.

Your regex

Loading RE2 engine…

    Tester

    Paste one query or URL per line, or load a Search Console export (CSV). With a CSV, you'll also see clicks, impressions, CTR and position for the matched group.

    Explain a regex

    Paste any pattern to get a plain-English breakdown and RE2 compatibility warnings.

    How to use it

    1. Choose where you'll paste the filter - Search Console, GA4 or Looker Studio. Each one matches slightly differently, and the tester follows the rule for the platform you pick.
    2. Tick the patterns you want. Several ticked patterns are joined with OR, so a row matches if it satisfies any one of them.
    3. Edit the keyword, brand or city lists inside each pattern so they describe your site rather than mine.
    4. Load a Search Console CSV export in the tester. You'll see exactly which queries the filter catches, plus the clicks, impressions, CTR and average position of the matched group.
    5. Copy the regex and paste it into the filter. In Search Console that's Performance → + Add filter → Query → Custom (regex).

    Why patterns from other regex testers get rejected

    Google's tools run on RE2, not PCRE. RE2 guarantees every match finishes in linear time, and it buys that guarantee by dropping the features that can backtrack: lookaheads and lookbehinds ((?=...), (?<!...)), backreferences (\1), atomic groups and possessive quantifiers. A pattern built in a standard JavaScript or Python regex tester can be perfectly valid there and still be refused by Search Console.

    This tool compiles your pattern with an actual RE2 engine in the browser, so a pattern that passes here is the same syntax Google accepts. If the engine can't load, it falls back to a browser check and says so next to the character count.

    Common questions

    What regex syntax does Google Search Console use?

    Search Console, GA4 and Looker Studio all use Google's RE2 syntax. RE2 deliberately leaves out lookaheads, lookbehinds, backreferences, atomic groups and possessive quantifiers, because it guarantees linear-time matching. Patterns copied from a PCRE or JavaScript regex tester often fail for exactly this reason.

    How do I exclude queries with regex in Search Console?

    Don't rewrite the pattern with a negative lookahead - RE2 won't accept it. Keep the regex as it is and switch the filter itself to "Doesn't match regex" in Search Console, or Exclude in GA4 and Looker Studio.

    Is there a character limit for Search Console regex filters?

    Yes. Search Console caps a regex filter at 4,096 characters. This tool counts characters as you build and warns you before you hit the limit, so you can split a long keyword list into two filters instead of having the filter rejected.

    Why does my regex match in Looker Studio but not GA4?

    GA4's "matches regex" requires the pattern to match the entire value, while Looker Studio's RegExp Contains matches anywhere inside it. Switch the platform toggle in the builder and the tester re-runs with that platform's matching rule, so you can see the difference against your own data.

    Is my Search Console data uploaded anywhere?

    No. The CSV is read by your browser with the File API and every match runs locally in the page. Nothing is sent to a server, and there is no analytics event carrying your query data.

    Built by C. Sivaraj. More tools on the tools page, and the reasoning behind them in the articles.