← DevHelpers|Regex Tester

Regex Tester — Test Regular Expressions Online

Test JavaScript regular expressions in your browser. Enter a pattern and sample text, then pause typing to see up to 1,000 matches highlighted. Inspect numbered capture groups and toggle flags; tests run in a cancellable worker with a 1-second limit.

Uses your browser’s JavaScript RegExp engine. Tests run after typing pauses, with a 1-second limit, up to 1 MB of text and the first 1,000 matches. Patterns can contain up to 10,000 characters. Empty matches appear as a small marker.

Flags

Matches: 0

0 / 0

Highlighted matches

Capture groups

Capture groups appear after a match is found.

Need a refresher on flags and capture groups?

Read Regex Basics & Testing

Test regex with live matches

The tester waits 300 milliseconds after typing pauses, then compiles a fresh JavaScript RegExp and highlights the first 1,000 matches. It accepts up to 1 MB of sample text and patterns up to 10,000 characters. Long-running tests stop after 1 second; editing cancels the previous test and clears its output.

Capture groups and flags

Inspect the numbered capture groups for a displayed match, and toggle global, case-insensitive, multiline, dot-all, Unicode and sticky flags. Empty matches have a visible marker. Oversized capture output is rejected so a large result does not overwhelm the page.

Frequently asked questions

How do I test a regular expression online?⌄

Enter a pattern and sample text, then pause typing. The tester uses your browser’s JavaScript RegExp engine and displays up to 1,000 matches with numbered capture groups. The UI reports invalid patterns, size limits and timeouts.

Does the regex tester show capture groups?⌄

Yes. Select a displayed match to inspect its numbered capture groups. The tester distinguishes an empty captured string from a group that did not participate.

Which regex flags are supported?⌄

Common JavaScript flags are supported, including global, case-insensitive, multiline, dotall and unicode.

Related tools & guides