Regex Tester
Inspect JavaScript matches, capture groups and start indices before using a pattern in code.
Maximum 500,000 characters. Use synthetic examples instead of secrets.
Local processing · No account · Input is not uploaded by this tool
How to use this tool
- Choose the relevant options. Set the operation, format or algorithm before running. The options above define how the result is interpreted.
- Enter data or load an example. Pattern: IH-(\d+), flags: g; text: Order IH-1042 shipped.
- Run and inspect the feedback. Use the primary action, then read the status message. An error clears old output so it cannot be mistaken for a fresh result.
- Copy, download or start again. Copy and Download become available when a current nonempty result exists. Reset clears the text result; no input is stored by this site.
How it works
A dedicated Web Worker constructs RegExp and iterates matches. The page terminates execution after a 750 ms budget and caps output at 1,000 matches. Zero-length matches advance safely.
The computation is performed by this page’s JavaScript after you choose Run. Input and results are kept in the current tab’s memory. There is no background submission, analytics event containing your input, or server-side conversion in this build.
Practical example
Use Load example to try the supported format, then change one value and run again. Comparing those two results is a quick way to understand what the operation changes and what it preserves. The linked guides below provide worked examples for the edge cases relevant to this utility.
Common mistakes
Enter the pattern without surrounding slashes. Use g for repeated search and remember that matching a shape does not prove a record exists.
Limits and unsupported tasks
JavaScript syntax differs from other regex engines. The budget includes worker startup and depends on device speed. Indices count UTF-16 code units; full d-flag indices are not shown. HTTP/HTTPS hosting is recommended for consistent browser support.
Privacy and handling sensitive data
Log subjects can contain account IDs, IP addresses and access tokens. Replace those with synthetic fields that preserve the pattern’s relevant shape. The worker receives the subject within your browser; its messages do not send the text to a remote service. Copy and Download use your device. Browser extensions and hosting logs have separate boundaries, explained in the privacy policy.
Usage guides
- JavaScript regex flags explained through observable examples
- Regex anchors and word boundaries: search vs full validation
- Capture groups, named groups and non-capturing groups
- Recognize regex backtracking problems before they freeze a page
- Unicode regex matches and JavaScript UTF-16 indices
- Extract fields from simple logs without building a fragile parser
- What regex validation can—and cannot—prove
Questions, answered
Does the Regex Tester upload my input?
No. The implementation processes it in your browser and does not submit it to a server. Ordinary page requests still reach the hosting service.
Why did Copy or Download become unavailable?
The input changed or validation failed, so the previous output was cleared. Run the tool again to create a current result.
Can I use this for every production workflow?
JavaScript syntax differs from other regex engines. The budget includes worker startup and depends on device speed. Indices count UTF-16 code units; full d-flag indices are not shown. HTTP/HTTPS hosting is recommended for consistent browser support.