Will this regex match in GA4 or Search Console?
Write a pattern and paste a few values, one per line. Each value is tested the way the product reads filters: GA4 needs the whole value to match and minds capital letters, Search Console matches any part of it and ignores them. Syntax that RE2 does not support, such as lookahead, is flagged instead of tested.
Paste page paths, page addresses, queries or any other values you filter on. Nothing is sent anywhere: the test runs in your browser.
What it does
- Reads the pattern as RE2. Search Console's help says "The RE2 syntax is used" for its regex filters (Search Console Help). Analytics Help gives Google's RE2 syntax page as its reference for regular expressions (Analytics Help).
- GA4: the whole value must match, and case matters. Analytics Help says Google Analytics uses full regex by default and is case sensitive, so /blog/ matches /blog/ but not /blog/post. Add .* for the rest of the value. RE2's (?i) at the start makes the match ignore case.
- Search Console: any part may match, and case does not matter. Its help says default matching is a partial match and not case sensitive, with (?-i) at the start to make it case sensitive. It offers Matches regex and Doesn't match regex for queries and pages, and so does this page.
- Flags what RE2 refuses. Google's RE2 syntax page marks lookahead, lookbehind, backreferences, possessive quantifiers, atomic groups, conditionals and \Z as not supported, and rejects counts above 1000. A pattern with any of them is listed, not tested, because the product would not accept it.
- Understands what only RE2 has. (?P<name>...), \A and \z, POSIX classes such as [[:digit:]], \Q...\E and \p{Greek} are rewritten so they test the way RE2 reads them. Like RE2, \s and \b here only know ASCII.
What it cannot tell you
It is a faithful copy, not RE2 itself. After RE2-only syntax is rewritten, the pattern runs on your browser's engine. Flags in the middle of a pattern, the U flag and \C cannot be copied exactly, so those patterns are not tested at all.
A length limit. Neither Google page states a maximum length for a regular expression in GA4 or Search Console (checked on 19 November 2026), so this page shows the length and sets no limit.
Your data. It tests the values you paste. Which values a report holds, for example page path or full page address, is up to the dimension you filter on.
Questions
Why does my GA4 filter match nothing?
Usually because GA4 needs the whole value to match. /blog/ only matches the value /blog/ itself. Write /blog/.* for every page in the folder, or .*shoes.* for any value that contains shoes.
How do I leave something out without lookahead?
RE2 has no lookahead, so ^(?!/blog) is refused. In Search Console, write the part to leave out and choose Doesn't match regex. In GA4, use the exclude or "does not match" option of the filter you are building, where it offers one.
How do I match Greek with and without accents?
An accented letter is a different character, so write both in brackets: παπο[υύ]τσια matches παπουτσια and παπούτσια. In Search Console capitals do not matter. Avoid \b next to Greek letters, because RE2 only sees Latin letters as word characters: use ^, $ or \s instead.
Can I use | for several values?
Yes: shoes|boots|sandals. Leave out spaces around the |, because a space is part of the pattern. In GA4, wrap them when there is more around them: /(shoes|boots)/.*