Skip to content

Regex Tester & Debugger

Test regular expressions with live match highlighting and capture groups.

Private Instant No sign-up No daily limit

Free to use. No account, no daily limit, and no watermark on the result.

 Pattern

Ready
Quick insert

 Matches

0 matches

 Highlighted preview

How to test a regular expression online

1

Enter your pattern

Type the expression you want to check and pick the flags you need — g, i, m, s, u or y — next to it.

2

Paste the test string

Drop the text you want to search into the test area. Results refresh as you type in either field.

3

Read the match list

Every hit is listed with its index, the matched text and each capture group ($1, $2, $3 …) including named groups.

4

Spot the highlights

The preview panel wraps each match in a highlight so you can see exactly where your pattern fires inside the text.

Regex tester — frequently asked questions

Your pattern is compiled with the browser’s native RegExp engine, so it follows the JavaScript syntax — which is also what Node.js, TypeScript and modern browsers use. Patterns written for Python, PHP or PCRE may need small adjustments (for example (?<name>…) becomes (?<name>…) only in engines that support it).

g finds every match instead of stopping at the first, i makes matching case-insensitive, m makes ^ and $ match at line breaks, s lets . match newlines, u enables full Unicode handling and y makes the match sticky (anchored to the last position).

An invalid pattern throws a SyntaxError with a description such as “Unterminated group” or “Nothing to repeat”. The tester catches that error and shows the browser’s own message so you can fix the syntax without guessing.

Parentheses such as (…) capture the text they match and store it as $1, $2 and so on. Writing (?:…) groups the pattern without storing anything, which keeps your group numbers tidy when you only need the grouping for alternation.

No. Matching happens in your browser with the native RegExp engine, so pasted log files, customer records or API payloads never leave your device.

Related Developer Tools