code: def _target_id_from_htm(self, line):
          
          # Detecting modern mbed.htm file format
          m = re.search("\\?code=([a-fA-F0-9]+)", line)
          if m:
              result = m.groups()[0]
              return result
          # Last resort, we can try to see if old mbed.htm format is there
          m = re.search("\\?auth=([a-fA-F0-9]+)", line)
          if m:
              result = m.groups()[0]
              return result
  
          return None
docs: ! Extract Target id from htm line.
          @return Target id or None