text: // We could have used indexOf to test for a simple string
  // - Regexes allow a lot more options
  
  // Match all strings that contain a digit
  
  // - putting a set of characters between brackets makes that part of the expression match any of the characters between the brackets
  console.log(/[0123456789]/.test("in 1992"));
  
  // - within brackets, a hyphen between 2 characters indicates a range of characters, where the ordering is determined by Unicode numbers
  console.log(/[0-9]/.test("in 1992"));
  
  // Some common character groups have their own built-in shortcuts
  // - \d -> any digit character
  // - \w -> any alphanumeric character (word character)
  // - \s -> any whitespace character (space, tab, newline, etc.)
  // - \D -> any character that is NOT a digit
  // - \W -> a nonalphanumeric character
  // - \S -> a nonwhitespace character
  // - . -> any character except for newline
  
  // Match datetime format like 01-30-2003 15:20
  let datetimePattern = /\d\d-\d\d-\d\d\d\d \d\d:\d\d/;
  console.log(datetimePattern.test("01-30-2003 15:20"));
  console.log(datetimePattern.test("30-jan-2003 15:20"));
  
  // Backslash codes can also be used inside brackets
  // - [\d.] -> any digit or a period character
  // - special chars like . and + lose special meaning inside brackets
  
  // putting ^ after opening square bracket inverts the set of characters
  // - bracket group now matches any character that is not 0 or 1
  let notBinary = /[^01]/;
  console.log(notBinary.test("11101101110"));
  console.log(notBinary.test("11101101210"));
  