import re


def _process_table_column(col):
    """
    Column data comes in the form -xyz or -xyz/abc/def.  If there
    is only one example, then it applies to all endings. If there
    are multiples (i.e. slashes exist), then the correct ending uses
    the ending index. For example, if the word had ending type 1, it would
    have the ending "abc" in the example above.

    This processing creates a list to be easily appended to the stem once
    the ending number is known.
    """

    raw = col.replace("-", "").replace(u"∅", u"")
    raw = re.sub(r"<sup>.*?</sup>", "", raw)
    ending_list = raw.split("/")
    if len(ending_list) == 1:
        # yes 3 is a magic number. I don't know how many possible endings
        # there will be.
        ending_list = ending_list * 3

    return ending_list