'Define the repeater of the current chain part.
:param value:
:type value:
:return:
:rtype:'

def repeater(self, value):

    try:
        value = int(value)
        self.repeater_start = value
        self.repeater_end = value
        return self
    except ValueError:
        pass
    if (value == '+'):
        self.repeater_start = 1
        self.repeater_end = None
    if (value == '*'):
        self.repeater_start = 0
        self.repeater_end = None
    elif (value == '?'):
        self.repeater_start = 0
        self.repeater_end = 1
    else:
        match = re.match('\\{\\s*(\\d*)\\s*,?\\s*(\\d*)\\s*\\}', value)
        if match:
            start = match.group(1)
            end = match.group(2)
            if (start or end):
                self.repeater_start = (int(start) if start else 0)
                self.repeater_end = (int(end) if end else None)
    return self
