import re


def search_running_config(device, option):
    """ search config in show running-config output

        Args:
            device (`obj`): Device object
            option (`str`): key word to search
        Returns:
            config (`str`): search result
    """
    out = device.execute("show running-config | include {}".format(option))

    config = None

    m = re.search(r"{} +(?P<cfg>[\S]+)".format(option), out)
    if m:
        config = m.groupdict()["cfg"]
    return config