Regex Tester

Test and debug regular expressions in real-time

/ /

Error

Results

matches found
No matches found

Quick Reference

Character Classes

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

Quantifiers

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

Anchors

  • ^ - Start of string/line
  • $ - End of string/line
  • \\b - Word boundary

Groups

  • (abc) - Capture group
  • (?:abc) - Non-capture group
  • a|b - a or b