Skip to content
Tools · Regex Tester

Validate your regex live.

RE2 syntax — the same engine GA4 and BigQuery use. Test against sample URLs, highlight matches and capture groups, all in the browser. Nothing leaves the tab.

Do not include the leading/trailing slashes (e.g., use pattern not /pattern/).

Results

3 Matches
  • /blog/seo/how-to-guide
  • /blog/marketing/tips
  • /blog/analytics/ga4-setup
  • /contact-us
  • /BLOG/SEO/capitalized

Quick Templates

Why a GA4-specific regex tester?

GA4 and BigQuery use Google's RE2engine — a subset of PCRE that doesn't support lookaheads, lookbehinds, or back-references. Patterns that work in online regex playgrounds (which mostly use PCRE) can silently fail in production.

This tester enforces RE2 syntax so you catch incompatibilities before shipping them to a filter, audience, or lookup table.

Regex in GTM is most commonly used in Custom Event triggers and Lookup Table variables. For a full walkthrough of GTM's variable types (including when Lookup Tables with regex beat a Matches RegEx condition), read GTM Variables: A Guide to the 6 Most Useful Custom Types.