Regex Tester & Debugger

Test JavaScript regular expressions with instant highlighting, match statistics, capture groups, and common templates.

Regular Expression
/ /
g i m s u
Presets
Test String 0 Matches
Match Details & Capture Groups
# Index Full Match Capture Groups
No matches found.

Regular Expression Cheat Sheet

Character Classes
  • . Any character except newline
  • \d Any digit [0-9]
  • \w Word character [a-zA-Z0-9_]
  • \s Whitespace (space, tab, newline)
Quantifiers
  • * 0 or more times
  • + 1 or more times
  • ? 0 or 1 time (optional)
  • {min,max} Between min and max
Anchors & Groups
  • ^ Start of string or line
  • $ End of string or line
  • (...) Capture group
  • (?:...) Non-capturing group