def METHOD_NAME(self, line):
    """Extract Target id from htm line.
    @return Target id or None
    """
    # 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