Regex Tester

Test and debug regular expressions in real-time with match highlighting and capture groups.

/ /
Test String
Matches 0
Enter a pattern and test string to see matches
Capture Groups 0
Capture groups will appear here
📖 Quick Reference — Common Regex Patterns
. Any character (except newline)
\d Digit [0-9]
\D Not a digit
\w Word char [a-zA-Z0-9_]
\W Not a word char
\s Whitespace
\S Not whitespace
\b Word boundary
^ Start of string/line
$ End of string/line
* 0 or more
+ 1 or more
? 0 or 1 (optional)
{n} Exactly n times
{n,m} Between n and m times
(...) Capture group
(?:...) Non-capturing group
(?=...) Lookahead
(?<=...) Lookbehind
[abc] Character set
[^abc] Negated set
a|b Alternation (or)

How to Use

  1. Type or paste your regex pattern in the input field at the top
  2. Toggle flags (g, i, m, s, u) using the buttons next to the pattern
  3. Enter your test string in the text area — matches highlight in real-time
  4. View all matches and capture groups in the results panels below
  5. Use preset patterns (Email, URL, IP, etc.) to quickly test common regex
  6. Click items in the Quick Reference to insert patterns into the regex field