Regex Tester
Test and debug regular expressions in real-time. Supports JavaScript regex with match highlighting, capture groups, and find-and-replace.
Common Regex Patterns
Basics
.Any character\dDigit (0-9)\wWord character\sWhitespace\bWord boundary
Quantifiers
*0 or more+1 or more?0 or 1{n}Exactly n{n,m}Between n and m
Groups & Lookahead
(abc)Capture group(?:abc)Non-capturing(?=abc)Lookahead(?!abc)Negative lookahead(?<=abc)Lookbehind
Character Classes
[abc]Any of a, b, c[^abc]Not a, b, or c[a-z]Range a to z[A-Z0-9]Upper + digits
Anchors
^Start of string$End of string\bWord boundary\BNon-word boundary
Common Patterns
\b[\w.-]+@[\w.-]+\.\w+\bEmailhttps?://\S+URL\b\d{1,3}(\.\d{1,3}){3}\bIPv4^#?([0-9a-f]{3}|[0-9a-f]{6})$Hex color
About This Regex Tester
This free online regex tester lets you write and test JavaScript regular expressions against any input string. See matches highlighted in real-time, inspect capture groups and their indices, and use the replace tab to preview find-and-replace results before applying them in your code.
All processing happens entirely in your browser - no data is sent to any server. Toggle regex flags (global, case-insensitive, multiline, dotAll, unicode, sticky) to customize matching behavior. Share your patterns using the URL - the regex, flags, and test string are encoded in the page URL so you can bookmark or share with teammates.
Built with care by NitroBuilds - discover the best developer tools and stacks