Regular Expression
Enter your regex pattern and flags
//
Test String
Enter the text to test your regex against
Results
No matches found
Quick Reference
Common regex patterns and syntax

Character Classes

  • \d - Digit (0-9)
  • \w - Word character (a-z, A-Z, 0-9, _)
  • \s - Whitespace
  • . - Any character
  • [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
  • \B - Not word boundary

Groups

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