Free Regex Tester

Test regular expressions against sample text with live match results.

This uses JavaScript's regex flavor, which is very close to PCRE but has a few differences (like lookbehind support varying by browser version) — if you're testing a pattern for use in PHP, Python, or another language, double check flavor-specific syntax before relying on results here.

Worked Example

Example: Pattern \d{3}-\d{4} against text Call 555-1234 or 555-5678 matches both 555-1234 and 555-5678.

Formula / Method

Uses JavaScript's native RegExp object with the g (global) flag plus any flags you specify, calling matchAll() to find every match and its capture groups.

Worked Example

Example: Pattern \d{3}-\d{4} against text Call 555-1234 or 555-5678 matches both 555-1234 and 555-5678.

Formula / Method

Uses JavaScript's native RegExp object with the g (global) flag plus any flags you specify, calling matchAll() to find every match and its capture groups.