Free online regex tester — match, validate & debug, 100% private in your browser.
Run a Google Analytics 4 page path regex check or build an event filter regex, confirm it against sample data, then paste it into GA4 — 100% private in your browser.
This free GA4 regex tester lets you write a regular expression, run it against sample data, and see every match the instant you type — before you paste it into a Google Analytics 4 filter, exploration or audience. It is built for the exact jobs analytics work happens on every week: a Google Analytics 4 page path regex check, an GA4 event filter regex generator, an exploration segment, an exclusion filter or a campaign-parameter match. Because it runs entirely in your browser with the native JavaScript RegExp engine, whatever matches here will match the same way in your web app, and your data never leaves your device. For ready-made patterns, see the GA4 regex cheat sheet — 25+ copy-paste examples for page path, events, traffic source and titles, or browse the full regex pattern library: dates, emails, URLs, IPs, UUIDs, UTM parameters and more — each pattern explained, tested live and ready to copy.
GA4 matches regex in full, not in part, which is the number-one reason a filter returns
no data. A pattern of /blog/ only matches that exact string, so to catch every page inside a
section you anchor it and open it up: ^/blog/.* for everything under the blog, or
.*womens.* to match a word anywhere in the path. Type either into the tool, paste a few real
page path values as the test string, and confirm the highlighted rows before you apply it
to a GA4 custom report, exploration or page-location filter. The complete walkthrough — full-match rules,
five common mistakes and 15+ patterns — is in the
GA4 page path regex guide.
To filter on several event names at once, combine them with the alternation pipe and anchor both ends so
nothing extra slips in: ^(purchase|begin_checkout|add_to_cart)$ matches exactly those three
events and nothing else. Test it against a list of your own event names here first to
catch a typo or an unintended partial match, then drop it into a GA4 event-name filter, a key-event
condition or an audience rule with confidence. Full recipes — multi-event alternation, prefix/suffix
conventions and parameter filters — are in the
GA4 event filter regex guide.
Almost every “GA4 regex not working” report comes from the same place: GA4 uses
full-match semantics, so a bare substring returns nothing. The fix is the dot-star wrapper,
.*value.*, which turns a substring into a full match — test the exact pattern here and you
will see the rows light up. Which screens accept the short partial form instead is mapped in the
GA4 regex match types guide. One nuance to remember: Google Analytics 4 uses the RE2
syntax, which supports anchors, alternation and quantifiers but not look-around or back-references, so
keep your patterns inside that subset before moving them from this tester into GA4.
The same tester covers every place GA4 accepts regex: exploration filters on page path
and screen class, segment and audience definitions, exclusion rules such
as ^/admin/. paired with the does-not-match operator, landing page
patterns, UTM source and medium checks like .*(newsletter|partner).*, and
custom channel group rules — the exact surface where you define what each channel
means, with the full walkthrough and 8 copy-paste patterns in the
GA4 custom channel grouping regex guide. An
Unassigned row in your channel report? The
Unassigned traffic regex fix guide walks the diagnosis
and ships 6 source/medium recapture patterns. Checkout returns crediting Stripe as a referral?
The referral exclusion regex guide has 5 ready-made
patterns for List unwanted referrals. Build the
pattern on the left, read the match list on the right, and carry a verified regex straight into your
GA4 property.
Everything runs 100% client-side: your patterns and analytics data are processed locally
and never sent to any server, so the page loads in well under a second, works offline
once loaded, and costs nothing — no sign-up, no watermarks, no limits. Use the explanation panel to
understand a pattern token by token, the substitution box to preview a reformat with references like
$1, and the flag toggles for global, case-insensitive, multiline, dotall, unicode and sticky
matching.
No. All matching runs in your browser with JavaScript. Your patterns and analytics data never leave your device, so it is safe for internal URLs, campaign parameters and private event names.
GA4 uses full-match regex by default, not partial match. A pattern like /blog/ only matches that exact value. To match a substring anywhere in the page path, wrap it with the dot-star metacharacter, for example .*blog.* — test it here first to confirm it matches the way you expect before pasting it into a GA4 filter. A few GA4 screens (report filters, custom channel groups) also offer a partially matches regex option where the short form works — see GA4 regex match types for which surface offers what. If the filter already saved and still returns nothing — or is rejected outright — the GA4 regex not working triage walks the six causes in order.
Google Analytics 4 uses the RE2 syntax, the same flavor as Google Search. RE2 supports common patterns, alternation, anchors and quantifiers but not look-around or back-references. This tool uses your browser's native JavaScript RegExp engine, which is very close to RE2 for everyday GA4 patterns, so always confirm a pattern stays within RE2 — the RE2 vs PCRE guide lists every unsupported construct with its replacement.
Anchor the pattern to the start of the path for section filters, for example ^/blog/.* for every blog page, or use .*womens.* to match a word anywhere in the path. Type the pattern into the tool, paste sample page paths as the test string, and confirm the matches before applying it in a GA4 exploration or custom report filter.
Combine event names with the alternation pipe and anchor both ends, for example ^(purchase|begin_checkout|add_to_cart)$ to match exactly those events. Test it against a list of your event names here so you catch typos and unintended matches before using it as a GA4 event name filter or in an audience definition.
Yes. Write the pattern for the paths you want to remove, such as ^/admin/.*, verify which rows it matches here, then choose the does-not-match regex operator when you apply it in GA4 so those paths are excluded from the report.