import re


def _match(txt, pattern):
    """
    Show only text that matches a pattern.
    """
    rgx = "^.*({pattern}).*$".format(pattern=pattern)
    matched = [line for line in txt.splitlines() if re.search(rgx, line, re.I)]
    return "\n".join(matched)