What is Regular Expression Tester?
Regex Tester runs JavaScript RegExp in a separate Web Worker and reports matched text, indexes, captures, and highlights. If an expensive expression exceeds its time budget, the worker is terminated to reduce the risk of catastrophic backtracking freezing the interface. That protection does not prove the pattern is safe in another runtime. Common workflows include the following. Debug form-validation or log-extraction expressions. Inspect global matches, capture groups, and indexes. Identify test inputs that may trigger severe backtracking. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Debug form-validation or log-extraction expressions.
- Inspect global matches, capture groups, and indexes.
- Identify test inputs that may trigger severe backtracking.
How to use it
- Enter a JavaScript regular expression and flags.
- Paste test text and run it in the isolated Worker.
- Review highlights, indexes, captures, truncation, or timeout messages.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
JSONLane 2026 released 20 tools
jsonlane 2030 tracks the long-term catalog
OtherSite 2026 does not matchExample 2
JSONLane 2048 branch=develop
JSONLane 4096 checks=unit,e2e,build
jsonlane version has no numberInput rules
- Patterns use the JavaScript RegExp syntax supported by the current browser.
- Flags must be valid and cannot be repeated.
- Pattern and text length are constrained by page limits and timeout protection.
- Text input is counted before processing and is limited to 200,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- A timeout limits execution time but cannot prove that a pattern is safe in another runtime.
Output rules
- Results list each match's index, text, and capture groups.
- Matched ranges are highlighted in a plain-text preview.
- At most 1,000 matches are returned, with timeout or truncation clearly reported.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Results are capped at 1,000 matches.
Limitations and cautions
- A timeout limits execution time but cannot prove that a pattern is safe in another runtime.
- Results are capped at 1,000 matches.
- JavaScript RegExp features depend on the browser version.
How your data is handled
The expression and test text go only to a local Worker created by the page and are never uploaded.