def highlight(self, pattern, schema):
if pattern is None:
return
for match in set(re.findall(re.compile(pattern), self._str)):
self.replace(match, schema + match + Colors.Style.RESET_ALL + self._color_spec)
文章目录