toolsss

Regular Expression Tester

Regular Expression

Test Text

Enter a regex pattern to test

Match Details

Index Full Match Groups Index Range
No matches found

Regex Cheat Sheet

Character Classes

  • . - Matches any character except newline
  • \w - Matches word characters (a-z, A-Z, 0-9, _)
  • \d - Matches digits (0-9)
  • \s - Matches whitespace (space, tab, newline)
  • [abc] - Matches either a, b or c
  • [^abc] - Matches any character except a, b or c

Quantifiers

  • a* - 0 or more of a
  • a+ - 1 or more of a
  • a? - 0 or 1 of a
  • a{3} - Exactly 3 of a
  • a{3,} - 3 or more of a
  • a{3,5} - 3, 4, or 5 of a

Anchors & Groups

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