Free Regex Tester

Test a pattern against real text with live match highlighting and capture groups.

Home

Enter a JavaScript-flavored regular expression and a test string, and see every match highlighted live, along with each match's index and any capture groups โ€” useful for building and debugging a pattern before dropping it into code.

Regex Tester

Common flags: g matches every occurrence instead of stopping at the first, i ignores upper/lower case, m makes ^ and $ match the start/end of each line instead of the whole string, s lets . also match newlines.

How to read the results

Matches are highlighted directly in your test string as you run the pattern, and listed individually below with the exact substring matched, its starting index, and any capture groups (the parts of the pattern wrapped in parentheses) โ€” useful for confirming a pattern extracts exactly the piece of data you expect, like the domain from an email address or the number from a formatted string.

This uses JavaScript's native RegExp engine โ€” the same engine your pattern will run against if you're testing something destined for browser or Node.js code โ€” so behavior matches exactly what you'll see in production, including edge cases around greedy vs. lazy quantifiers and flag interactions.

More free tools