Home › Tools › Analytics and Tracking Tools › GA4 Regex Tester
Free Analytics Tool

GA4 Regex Tester

Paste a regular expression and the values you want to filter. See which ones match exactly the way GA4 or Search Console would, spot syntax that Google does not support, and build a regex from a simple list.

Your Regex

Results

0Match
0No Match
0Regex Length

Build a Regex From a List


      
Copied!

Why Use a Regex Tester for GA4?

Regular expressions let you filter many pages, campaigns or search queries with one rule. They power GA4 report filters, audiences, custom channel groups and the Search Console performance report. The catch is that each tool reads them a little differently, and a regex that works in a code editor can quietly fail in Google's tools.

This tester copies Google's behaviour. GA4 matches regex is a full match and case sensitive by default, as explained in Google's regular expressions help page. Search Console uses RE2, matches anywhere in the text and ignores case unless you start with (?-i), according to its filtering documentation.

How to Use the Tester

  1. Choose where the regex will be used: GA4 full match, GA4 partial match, or Search Console.
  2. Type your regex and paste the values you want to check, one per line. Real page paths or queries from a report work best.
  3. Read the results. Matching rows are highlighted, and in partial mode the matching part is marked.
  4. Fix any warnings, such as lookaheads that Google's RE2 engine does not support.
  5. Use the list builder to turn a plain list of pages or keywords into a safe, escaped regex.

Regex Cheat Sheet for Analytics

PatternMeaningExample
|Orseo|ppc
.*Anything, any length/blog/.*
^ and $Start and end of the value^/blog/$
( )Group options together/(en|hi)/pricing/
\.A real dot, not any characterthank\.html
[0-9]+One or more digits/p/[0-9]+
?The item before it is optionalcolou?r
(?i)Ignore case (Search Console style)(?i)brandella

Tips for Google Regex Filters

Put Your Regex to Work

Use regex to separate brand searches with the branded queries filter in Search Console, dig into the Search Console performance report, and clean data as shown in how to detect and filter bot traffic in GA4. Want clean campaign values to filter on? Build them with the UTM builder.

Frequently Asked Questions

1What regex syntax does GA4 use?

Google Analytics and Search Console use Google's RE2 syntax. It supports the common patterns like |, .*, ^, $, groups and character classes, but not lookaheads, lookbehinds or backreferences.

2What is the difference between matches regex and partially matches regex in GA4?

Matches regex must match the whole value. Partially matches regex passes if any part of the value matches. For example, seo fully matches only the value seo, but partially matches /blog/seo/tips/.

3Is Search Console regex case sensitive?

No. Search Console regex ignores case by default. Start your expression with (?-i) to make it case sensitive.

4Is my data sent anywhere?

No. All testing runs in your browser and nothing you paste is uploaded.

Related Articles

More Free Analytics and Tracking Tools

See all analytics and tracking tools →  |  Browse every free tool →