def find(self, pattern: str) -> Optional[str]:
regexp = re.compile(pattern)<EOL>for message in cli_ui._MESSAGES:<EOL><INDENT>if re.search(regexp, message):<EOL><INDENT>return message<EOL><DEDENT><DEDENT>return None<EOL>
Find a message in the list of recorded message

        :param pattern: regular expression pattern to use
                        when looking for recorded message