Regular expression tester
Test a JavaScript regular expression against sample text, see every match and named group, and switch flags like g, i and m.
- Runs in your browser
- No upload
- Result stays on your device
Privacy & limitsRuns in your browser. Nothing is uploaded.
Input content stays in this tab; Refentra does not upload or store it. Optional aggregate action counts are sent only with your usage consent. Clear the workspace when finished.
Supported profile: ECMAScript RegExp: 1.5-second worker limit, 1,000-character pattern, 50,000-character sample, 1,000 matches.
Maximum text: 200,000 UTF-16 units; parser limits can be smaller. Worker time limit: 15 seconds (regex 1.5 seconds).
Check the input and the result
- Prepare and choose the operation
Enter an ECMAScript pattern without slash delimiters, the flags separately, and the text to search.
- Check a concrete example
Use this sample and compare the indicated result: \d+ / g / a12 b3 → 12, 3
- Check the output before you reuse it
Check the match offsets and captures. Add anchors if the whole input must match rather than any part of it.
Answers for this task
Why does g change the result?
Global matching returns every match in turn, while without g the search may stop at the first. Flags also affect case and the multiline anchors.
What should I check if the input fails?
Fix unmatched brackets and duplicate or unsupported flags. If the worker times out, simplify nested quantifiers.
Where does this tool stop?
Pattern ≤1,000 characters, text ≤50,000, at most 1,000 matches and a 1.5-second worker budget. This doesn't prove a regex is safe for production.