REGEX TESTER
Test a pattern against a string with live match highlighting. Nothing leaves your browser.
In short
Test a JavaScript regular expression against a string, with live match highlighting, capture groups, and named groups. Runs entirely in your browser.
//g
Contact us at hello@example.com or support@dimastoolbox.com
Match details
- #1 at index 14hello@example.comGroup 1: helloGroup 2: example
- #2 at index 35support@dimastoolbox.comGroup 1: supportGroup 2: dimastoolbox
How to test a regular expression
- 1
Type a regular expression pattern and toggle the flags you need (g, i, m, s, u).
- 2
Paste or type the text you want to test it against.
- 3
See every match highlighted live, with capture groups and their positions listed below.
Questions
- What regex flavor does this use?
- JavaScript's native RegExp engine — the same one that runs in every browser and in Node.js. Patterns behave exactly as they would in your own JS code.
- What do the flags mean?
- g finds all matches instead of stopping at the first; i makes matching case-insensitive; m makes ^ and $ match the start/end of each line instead of the whole string; s makes . also match newlines; u enables full Unicode handling.
- Why do I only see one match without the g flag?
- That mirrors how JavaScript's regex.exec() behaves — without the global flag, only the first match is returned. Turn on g to find every match in the string.
- Are named capture groups supported?
- Yes — use the (?<name>...) syntax in your pattern and the named groups will show up separately from the numbered groups in the match details.
- Is my text or pattern sent anywhere?
- No. Matching happens entirely in your browser using JavaScript's built-in regex engine.
Related tools
- CSS Selector TesterTest a CSS selector against pasted HTML: see matched elements, the match count, and the selector's specificity.
- Regex Escape ToolEscape special characters so text matches literally in a regex, for JavaScript, Python, PCRE, or POSIX, or unescape it back.
- Regex ExplainerPaste a regular expression and get a plain-English breakdown of every token, group, and quantifier.
- Cron Expression GeneratorBuild cron schedules visually or from presets, copy the expression, and preview the next 5 run times in your local timezone.
- Hash GeneratorGenerate SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.
- Base64 EncoderEncode text to Base64 or decode it back, with correct UTF-8 handling.
- UUID GeneratorGenerate random v4 UUIDs, one at a time or in bulk.
- JSON VisualizerExplore JSON as a tree, table, or mindmap.
Updated