REGEX Tester & Debugger

Test regular expressions in real-time with match highlighting and explanations.

Regular Expression Pattern

/ /
Enter a pattern and test string to begin 0 matches

Test String

Match Results

Match Details

No matches yet. Enter a pattern and test string above.

Pattern Explanation

Enter a pattern above to see an explanation

Replace/Substitution

Quick Reference

⚠ JavaScript RegEx Engine - This tool uses JavaScript's native regex engine. Some features may differ from PCRE, Python, or other regex flavors (e.g., no lookbehinds in older browsers, different Unicode handling).

Character Classes

  • \d - Digit (0-9)
  • \w - Word character (a-z, A-Z, 0-9, _)
  • \s - Whitespace
  • . - Any character (except newline)
  • [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 times
  • {n,} - n or more times
  • {n,m} - Between n and m times

Anchors

  • ^ - Start of string
  • $ - End of string
  • \b - Word boundary
  • \B - Not word boundary

Groups

  • (abc) - Capture group
  • (?:abc) - Non-capturing group
  • a|b - Alternation (a or b)
  • (?=abc) - Positive lookahead
  • (?!abc) - Negative lookahead