<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detect_model_name(string):
 """Takes a string related to a model name and extract its model name. For example: '000000-bootstrap.index' => '000000-bootstrap' """

    match = re.match(MODEL_NAME_REGEX, string)
    if match:
        return match.group()
    return None