'Grep files in paths for any matches to content_regex_list.
Args:
source: artifact source
pathtype: pathspec path type
When multiple regexes are supplied, combine them into a single regex as an
OR match so that we check all regexes at once.'

def Grep(self, source, pathtype):

    path_list = self.InterpolateList(source.attributes.get('paths', []))
    content_regex_list = self.InterpolateList(source.attributes.get('content_regex_list', []))
    regex_condition = rdf_file_finder.FileFinderContentsRegexMatchCondition(regex=self._CombineRegex(content_regex_list), bytes_before=0, bytes_after=0, mode='ALL_HITS')
    file_finder_condition = rdf_file_finder.FileFinderCondition(condition_type=rdf_file_finder.FileFinderCondition.Type.CONTENTS_REGEX_MATCH, contents_regex_match=regex_condition)
    self.CallFlow(file_finder.FileFinder.__name__, paths=path_list, conditions=[file_finder_condition], action=rdf_file_finder.FileFinderAction(), pathtype=pathtype, request_data={'artifact_name': self.current_artifact_name, 'source': source.ToPrimitiveDict()}, next_state='ProcessCollected')
