import re


def get_colors_from_cost(cost):
    """
    Gets a color array from the cards cost

    :param cost: The cost string
    :return: An array of colors
    """
    colors = []
    for c in cost:
        if re.match('[WUBRG]', c) and c not in colors:
            colors.append(c)
    return colors