⬅️ Execute Program RegEx

Basic character classes

  • \d for digits
  • \s for whitespace (spaces, newlines, tabs, etc.)
  • Making these character classes upper-case negates them. For example, \d is all digits. But \D is any character that isn’t a digit.
/^\d*$/.test('3000')
var re = /^\d\d\d-\d\d\d\d$/;