import re


def is_warning_in_log(expected, log):
    """
    Search for a warning containing the expected message in the log. Returns
    True if found; False otherwise.

    :param expected: The regular expression
    "param log: The input string
    """

    # Escape possibly existing special characters
    escaped = re.escape(expected)

    regex = "WARNING.*" + escaped

    to_match = re.compile(regex)
    found = to_match.search(log)
    if found:
        return True

    return False