Regex Tester

Test and debug regular expressions with real-time matching and highlighting.

Test String

Matches

Enter a pattern and test string to see matches.

📢 Ad Space

Regex Quick Reference

Character Classes

  • . - Any character except newline
  • \d - Digit [0-9]
  • \w - Word character [a-zA-Z0-9_]
  • \s - Whitespace
  • [abc] - Character set
  • [^abc] - Negated set

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) - Capturing group
  • (?:abc) - Non-capturing
  • (?<name>abc) - Named group
  • a|b - Alternation