Advertisement

Regex Pattern Library

17 ready-made patterns, each one explained part by part, tested against match and no-match examples, and copy-pasteable into JavaScript, Python, SQL, GA4 and BigQuery. Click any Try link to load the pattern straight into the tester with sample data.

Not sure the pattern fits your data?
Open the tester, paste any pattern from this library, and add your own strings.
Open the regex tester →

Dates & Time

Validation

Extract & Replace

URLs & Marketing

Dev & Logs

GA4 guides

Every pattern on this page is RE2-compatible unless its page says otherwise — meaning it also works in Google Analytics 4, BigQuery, Go and Rust. Regex matching in the tester uses your browser's native engine; check the RE2 vs PCRE differences before shipping patterns to Google tools.