<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def case_insensitive_file_search(directory, pattern):
 """ Looks for file with pattern with case insensitive search """

    try:
        return os.path.join(
            directory,
            [filename for filename in os.listdir(directory)
             if re.search(pattern, filename, re.IGNORECASE)][0])
    except IndexError:
        print("{0} not found".format(pattern))
        raise