Regex Tester & Debugger

Test regular expressions with real-time matching and explanation

/ /

Common Patterns

Quick Reference

Character Classes

  • . - Any character
  • \d - Digit [0-9]
  • \w - Word [a-zA-Z0-9_]
  • \s - Whitespace
  • [abc] - Any of a, b, c
  • [^abc] - Not a, b, c

Quantifiers

  • * - 0 or more
  • + - 1 or more
  • ? - 0 or 1
  • {n} - Exactly n
  • {n,} - n or more
  • {n,m} - n to m

Anchors & Groups

  • ^ - Start of string
  • $ - End of string
  • \b - Word boundary
  • () - Capture group
  • (?:) - Non-capturing
  • | - Alternation (OR)