Skip to main content
SiteIndex

Developer

Regex Tester Documentation

Use the free Regex Tester →

Test regular expressions against sample text to validate search and parse logic quickly.

What does it do?

Test regular expressions against sample text to validate search and parse logic quickly.

How does it work?

Both actions execute JavaScript regexes in a dedicated Web Worker using the same flags. A one-second deadline terminates an unresponsive worker. Test pattern returns a boolean; Find all matches adds global enumeration and records UTF-16 positions, numbered captures, and named groups up to the output limit. Edits cancel prior work and clear results.

When to use it
  • Validate a regex before using it in code.
  • Review every match position in a longer text sample.
  • Extract named capture groups to confirm parsing logic.
Inputs and outputs
Input
Text, files, or values entered in the browser, depending on the tool.
Output
A result shown in the browser that can be reviewed or copied where supported.
Limitations
  • Evaluation uses a dedicated worker terminated after one second, including startup; very slow devices may need smaller inputs.
  • Limits are 2,000 pattern characters, 500,000 text characters, and 1,000 displayed matches. Supported syntax follows the browser, not PCRE or a server language.
Privacy and data handling

Inputs for this browser-side tool are processed locally and are not sent to SiteIndex. Normal page analytics may still be collected as described in the Privacy Policy. Read the Privacy Policy.

How to use it

  1. Enter a JavaScript pattern without / delimiters and choose flags.
  2. Paste synthetic text and select Test pattern or Find all matches.
  3. Expand the match details to inspect UTF-16 indices, numbered captures, and named groups; simplify timed-out patterns.

Related tools