import re


def apply_prefix(base_word, prefix_rules):
    """
    Evaluate prefix rules and apply the relevant rule to a word
    
    Parameters:
    base_word (string):    Base word
    prefix_rules (list):   Prefix rules to be evaluated
    
    Returns:
    The base word with the relevant prefix prepended
    """
    for prefix_rule in prefix_rules:
        if not re.search(prefix_rule[2], base_word):
            continue
        delete_chars = prefix_rule[0]
        prefix_chars = prefix_rule[1]
        part_word = (
                base_word[len(delete_chars):]
                if len(delete_chars) > 0
                else base_word
        )
        break
    else:
        return base_word
    return prefix_chars + part_word