<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _match_service(self, line_with_color):
 """Return line if line matches this service's name, return None otherwise."""

        line = re.compile("(\x1b\[\d+m)+").sub("", line_with_color)        # Strip color codes

        regexp = re.compile(r"^\[(.*?)\]\s(.*?)$")
        if regexp.match(line):
            title = regexp.match(line).group(1).strip()
            if title in self.titles:
                return (title, regexp.match(line).group(2))
        return None