code: def is_valid(doi):
      
      match = REGEX.match(doi)
      return (match is not None) and (match.group(0) == doi)
docs: Check that a given DOI is a valid canonical DOI.
  
      :param doi: The DOI to be checked.
      :returns: Boolean indicating whether the DOI is valid or not.
  
      >>> is_valid('10.1209/0295-5075/111/40005')
      True
  
      >>> is_valid('10.1016.12.31/nature.S0735-1097(98)2000/12/31/34:7-7')
      True
  
      >>> is_valid('10.1002/(SICI)1522-2594(199911)42:5<952::AID-MRM16>3.0.CO;2-S')
      True
  
      >>> is_valid('10.1007/978-3-642-28108-2_19')
      True
  
      >>> is_valid('10.1007.10/978-3-642-28108-2_19')
      True
  
      >>> is_valid('10.1016/S0735-1097(98)00347-7')
      True
  
      >>> is_valid('10.1579/0044-7447(2006)35\[89:RDUICP\]2.0.CO;2')
      True
  
      >>> is_valid('<geo coords="10.4515260,51.1656910"></geo>')
      False