ToolJovia
Developer

Regex Tester

Test JavaScript regular expressions in an isolated worker with a 250 ms timeout and readable match positions.

✓ Browser-local processing
Supported flags: g, i, m, s, u.

Loading tool…

How to use Regex Tester

Check a JavaScript regular expression against sample text. A dedicated worker keeps expensive patterns away from the page, and the worker is terminated after each run.

  1. Enter a JavaScript regex pattern without slash delimiters.
  2. Choose flags and provide sample text.
  3. Run the test to inspect match text, character indices, and capture groups.

Good to know

  • Worker loading has a separate 10-second limit. The 250 ms pattern-processing limit starts only after the worker reports that it is ready.
  • Up to 1,000 pattern characters, 50,000 sample characters, and 200 displayed matches. Long matches and groups are abbreviated.
  • JavaScript regex syntax differs from PCRE, Python, and other engines. Indices are UTF-16 code-unit offsets.

Common questions

Can a difficult pattern freeze the page?

The pattern runs in a separate worker that is terminated if the safety timeout is reached.

What happens with an empty match?

The tester advances by one code point in Unicode mode, or one code unit otherwise, so global empty matches terminate.

Keep going with related tools

All developer →