GTM Regex Builder
Build Google Tag Manager-ready regular expressions from a list of URLs, page paths, events, IDs, or text values.
Generated Regex
Copy this expression into the relevant GTM trigger or variable condition.
Test Your Regex
Enter a sample value to check whether your generated regex matches it.
Quick Presets
GTM Regex Best Practices
- Use exact match for specific page paths, IDs, and event names.
- Use one value per line to keep your source list easy to review.
- Test sample values before publishing your GTM container.
- Use “contains” carefully because it can match unintended values.
- Keep regex rules documented in your GTM naming convention.