def init_group_category_regex(category_groups, category_regex_args):
    """
    Initialize and compile regular expression for category groups

    :param category_regex_args:         List of string regex

    :return:                            List of compiled regex
    """
    category_regex = []
    authorized_empty_regex = 1
    if len(category_regex_args) and len(category_groups) != len(category_regex_args):
        printError('Error: you must provide as many regex as category groups.')
        return None
    for regex in category_regex_args:
        if len(regex) < 1:
            if authorized_empty_regex > 0:
                category_regex.append(None)
                authorized_empty_regex -= 1
            else:
                printError('Error: you cannot have more than one empty regex to automatically assign groups to users.')
                return None
        else:
            category_regex.append(re.compile(regex))
    return category_regex
Initialize and compile regular expression for category groups

    :param category_regex_args:         List of string regex

    :return:                            List of compiled regex