import re


def merger(list, string):
    """
    Takes a list of n-grams to merge in a string using #
    """
    regex = re.compile('|'.join(list))
    return regex.sub(lambda match: match.group(0).replace(' ', '#'), string)