def split_string_by_fields(string, fields):
    """
    Helper function to split a string by a set of ordered strings,
    primarily used for Maccor metadata parsing.

    >>>split_string_by_fields("first name: Joey  last name Montoya",
    >>>                       ["first name:", "last name"])
    ["Joey", "Montoya"]

    Args:
        string (str): string input to be split
        fields (list): list of fields to split input string by.

    Returns:
        list: substrings corresponding to the split input strings.

    """
    # A bit brittle, there's probably something more clever with recursion
    substrings = []
    init, leftovers = string.split(fields[0])
    for field in fields[1:]:
        init, leftovers = leftovers.split(field)
        substrings.append(init)
    substrings.append(leftovers)
    return substrings