Live Highlighting · Named Groups · Replace · Split · Explain — 100% local, no upload
Test regular expressions in real time with color-coded match highlighting. Supports all JavaScript flags, named capture groups, lookaheads, lookbehinds, replace mode with backreferences, split mode, a token-by-token explainer, and quick patterns for common use cases.
A regular expression (regex) is a pattern that describes a set of strings. It is used to search, validate, extract, replace, and split text. JavaScript's RegExp engine supports Unicode, named capture groups, lookaheads, lookbehinds, and all standard POSIX-style character classes.
This visualizer runs your regex directly in the browser using the native JS engine — no server, no latency, no data sent anywhere.
Type your pattern in the regex field. Matches appear highlighted instantly in the output area below the test string. Each match gets a distinct color. Group captures and named groups are listed per match.
Use (?<name>…) in your pattern. For example (?<year>\d{4})-(?<month>\d{2}) extracts year and month separately. Named groups appear labeled in each match card.
(?=…) is a positive lookahead: it matches a position followed by the pattern without consuming characters. (?!…) is negative. (?<=…) and (?<!…) are lookbehinds that check what comes before. Use the Explain feature for a token-by-token breakdown.
Switch to Replace tab and enter your replacement string. Use $1, $2 for numbered groups, $<name> for named groups, and $& for the full match. The preview updates live.
Yes. Click Share link — the pattern, flags, and test string (up to 500 chars) are encoded in the URL hash and copied to your clipboard. Anyone with the link sees the same state.