import re


def parse_indications(indications, split_keys):
    """
    Split a string of indications into a list of terms to be queried vs HPO
    """

    split_ind = re.split('[;/]', indications)

    for split_key in split_keys:
        subsplit = [t.split(split_key) for t in split_ind]
        split_ind = [item for sublist in subsplit for item in sublist]

    split_ind = [s for s in split_ind if s is not '']

    return split_ind