Global matching
The global flag finds repeated matches. Without it, JavaScript returns only the first match from the input.
Developer utility
Build JavaScript regular expressions, highlight matches, inspect capture groups, and preview replacements without sending text to a server.
Uses the browser JavaScript RegExp engine.
Regex compiled.
Matches are highlighted in source order.
Capture groups are listed as JSON arrays or named objects.
| # | Index | Match | Groups |
|---|
The global flag finds repeated matches. Without it, JavaScript returns only the first match from the input.
Parentheses capture submatches for extraction and replacement. Named groups make larger expressions easier to read.
JavaScript replacements can use tokens like $& for the full match, $1 for a capture, and $<name> for a named capture.
Usage guide
It compiles JavaScript regular expressions, highlights matches, lists indexes and capture groups, and previews replacement output.
Edit the pattern, toggle flags, paste sample text, and use named groups to confirm exactly what your expression captures.
Use it for log parsing, form validation, search patterns, replacement rules, or learning how anchors, groups, and quantifiers behave.