import re


def word_replace(re_map, word):
    """Regex replace all occurrences of keys in re_map with their value."""
    for key, value in re_map.items():
        word = re.sub(key, value, word, flags=re.UNICODE)
    return word