JavaScript Regex Tester

Test a JavaScript regular expression against sample text and inspect matches.

Test a JavaScript regular expression against sample text and inspect matches.

Options

Up to 100,000 input code units and a 1000-character pattern; at most 1000 matches. JavaScript semantics only. Run in a terminable Worker with a 2-second budget; timeout is an error, never a no-match result. Zero-length matches must advance by the selected Unicode mode. No replacement or other regex engines.

How to use

JavaScript Regex Tester

Test a JavaScript regular expression against sample text and inspect matches.

Step by step

  1. Choose a supported input or load the example, then review the original.
  2. Test a JavaScript regular expression against sample text and inspect matches. Start with the displayed settings, change only the options needed for your output and compare the result with your source.
  3. Run the task, review the actual result and copy or download a checked copy.

Choosing the settings

OptionWhat changes
OptionsTest a JavaScript regular expression against sample text and inspect matches. Start with the displayed settings, change only the options needed for your output and compare the result with your source.
LimitsUp to 100,000 input code units and a 1000-character pattern; at most 1000 matches. JavaScript semantics only. Run in a terminable Worker with a 2-second budget; timeout is an error, never a no-match result. Zero-length matches must advance by the selected Unicode mode. No replacement or other regex engines.

Example and expected result

Pattern \d+ with g against Item 42 / Item 7 gives matches 42 and 7 at UTF-16 offsets 5 and 15.

If it is not working

  • This expression exceeded the 2-second budget. Simplify it or reduce the sample; both inputs are kept.

Formats and limits

Up to 100,000 input code units and a 1000-character pattern; at most 1000 matches. JavaScript semantics only. Run in a terminable Worker with a 2-second budget; timeout is an error, never a no-match result. Zero-length matches must advance by the selected Unicode mode. No replacement or other regex engines.

FAQ

What does this tool do?

Test a JavaScript regular expression against sample text and inspect matches.

Which setting should I choose?

Test a JavaScript regular expression against sample text and inspect matches. Start with the displayed settings, change only the options needed for your output and compare the result with your source.

What are the limits?

Up to 100,000 input code units and a 1000-character pattern; at most 1000 matches. JavaScript semantics only. Run in a terminable Worker with a 2-second budget; timeout is an error, never a no-match result. Zero-length matches must advance by the selected Unicode mode. No replacement or other regex engines.

Why did processing fail?

This expression exceeded the 2-second budget. Simplify it or reduce the sample; both inputs are kept.

Is my input uploaded or saved?

No. Processing runs on your device. Inputs and results stay in this page’s memory until you clear it or leave. They are not uploaded, logged or stored by ToolRobin. Copying places the result on your device’s clipboard.