def get_column_map(columns=None, filter_=None, ignore_columns=None):
    """ Return a dict containing columns and their regex matches

    :param columns: List of the columns to scan
    :param filter_: The filter object that contains the regular
        expression to use when scanning the column.
    :ignore_columns: A set containing column numbers which should be
        ignored and not scanned.
    """
    column_map = {}
    for i, column in enumerate(columns):
        if i + 1 in ignore_columns:
            continue
        _matches = filter_.regex.findall(column)
        if not _matches:
            continue
        final_matches = []
        for match in _matches:
            include = True
            for exclude_pattern in filter_.exclude_patterns:
                if exclude_pattern.search(match):
                    include = False
            if include:
                final_matches.append(match)
        for match in final_matches:
            j = str(i)
            if j not in column_map:
                column_map[j] = []
            column_map[j].append(match)
    return column_map
