<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_num(string):
 """Takes a string related to a model name and extract its model number. For example: '000000-bootstrap.index' => 0 """

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