Skip to content

GA4 & GTM Regex Tester

Test and build regex patterns for GA4 and GTM. GA4 uses RE2 syntax (not PCRE), which means no lookaheads, lookbehinds, or backreferences. This tool validates against the correct engine so your patterns work in production.

GA4 mode: Validates against RE2, partial match by default (like GA4 report filters).

GTM mode: Applies full match behavior (GTM wraps in ^...$ for “matches RegEx”).

GA4 & GTM Regex Tester
Context
Common patterns
Test strings