def parse_ip_regex_str(ip_regexs_str):
    """
    It splits a comma separated string into a list.
    Each one in the result list should be a regex string.
    :param ip_regexs_str: is a comma separated string, such as: `192[.]168[.],172[.]16[.]`.
    With this argument, it returns: `['192[.]168[.]', '172[.]16[.]']`.

    These two regex matches all ipv4 addresses those are started
    with `192.168.` or `172.16.`

    :return: a list of regex string.
    """
    ip_regexs_str = ip_regexs_str.strip()

    regs = ip_regexs_str.split(',')
    rst = []
    for r in regs:
        # do not choose ip if it matches this regex
        if r.startswith('-'):
            r = (r[1:], False)
        else:
            r = (r, True)

        if r[0] == '':
            raise ValueError('invalid regular expression: ' + repr(r))

        if r[1]:
            r = r[0]

        rst.append(r)

    return rst