Regex Tester
Test regular expressions with live highlighting.
Regular expressions (regex or regexp) are powerful patterns for matching, searching, extracting, and validating text. They are used in every programming language, text editor, and command-line tool, but their dense syntax is notoriously tricky to get right. Our free Regex Tester lets you experiment with JavaScript regex live, with instant highlighting and match details.
Enter your regex pattern in the pattern box (without surrounding / slashes — though they will be stripped if you include them), toggle flags (g, i, m, s, u, y), and type or paste your test text. Matching substrings are highlighted in the text panel as you type, and the match list below shows every match with its index position, captured groups, and full match text.
The flags: g = global (find all matches, not just the first), i = case insensitive, m = multiline (^ and $ match line boundaries), s = dotAll (the . metacharacter also matches newlines), u = Unicode (enable full Unicode support, including for p{} property escapes), y = sticky (match only from lastIndex).
We also include a quick reference card of common regex patterns directly below the tool: anchors, character classes, quantifiers, groups, lookaheads, and ready-to-use examples like email, URL, phone, and IPv4 patterns. This makes the tester useful both as a playground and as a learning reference.