Test regular expressions with live match highlighting and group details
A regex tester lets you write a regular expression and see instantly what it matches against your sample text, with every match and capture group highlighted live. Regular expressions are the universal mini-language for pattern matching — validating emails, extracting numbers from logs, find-and-replace in editors, route matching in web frameworks — but their dense syntax makes them notoriously easy to get wrong. Testing interactively turns regex writing from guesswork into a feedback loop: edit the pattern, see the matches change, repeat.
The tester supports the standard JavaScript flags — g (global), i (case-insensitive), m (multiline), s (dotall) and u (unicode) — and shows numbered and named capture groups for each match. Everything runs locally in your browser, so testing against real log extracts or production data is safe.
You probably need the g (global) flag. Without it, a JavaScript regex stops at the first match. Add g in the flags field to find every occurrence in the text.
Quantifiers like * and + are greedy by default — they match as much as possible. Adding ? (e.g. .*?) makes them lazy, matching as little as possible. The classic symptom of unwanted greed is a match that spans from the first quote in a line to the last instead of pairing them.
Parentheses create groups that capture parts of the match: (\d{4})-(\d{2}) captures year and month separately. Named groups (?<year>\d{4}) make patterns more readable. The tester lists each group's content per match.
Mostly. The core syntax is shared, but flavors differ in details: lookbehind support, named group syntax and character class shorthand vary. This tester uses the JavaScript flavor — verify exotic features in your target language.
UUID Generator · Timestamp Converter · Base64 Encoder · Base64 Decoder · Hash Generator · Color Converter