Developer Tools
Regex Tester for JavaScript
Test regular expressions against sample text.
Runs locally in your browser — your input is not uploaded.
What is this tool?
Write a pattern, paste some sample text, and see exactly what matches before the regex goes into your code. The tester uses your browser’s native JavaScript engine, so results match what RegExp does in modern browsers and Node.js.
Regular expressions are patterns that describe sets of strings. JavaScript uses the ECMAScript regex dialect with flags for global matching, case-insensitivity, multiline anchors, and more.
ToolForge runs your pattern with the native RegExp engine and guards against runaway zero-length match loops.
How to use the Regex Tester
- Enter a pattern and optional flags (g, i, m, s, u, y, d).
- Paste the text you want to test against.
- Review matches, indexes, and capture groups.
Examples
Find emails (simple)
Pattern: [a-z]+@[a-z]+\.[a-z]+ against hello@example.com
hello@example.com
hello@example.com
Frequently asked questions
Which regex flavor is this?
ECMAScript / JavaScript — the same engine your browser uses.
Why does my pattern only find one match?
Without the g (global) flag, JavaScript stops at the first match. Add g to list every occurrence.
How do I see capture groups?
Wrap part of the pattern in parentheses, such as (\d{4})-(\d{2}). Each match lists its numbered groups, and named groups like (?<year>\d{4}) are shown as well.
Want more power later?
Premium tools, higher limits, and API access are on the roadmap. V1 stays free and private in your browser.