code: def _check_regex(minion_id, regex):
      '''
      check whether or not this minion should have this external pillar returned
  
      :param minion_id: str
      :param minion_regex: list
      :return: bool
      '''
      get_pillar = False
      for pattern in regex:
          log.debug('nsot external pillar comparing %s with %s', minion_id, regex)
          match = re.search(pattern, minion_id)
          if match and match.string == minion_id:
              log.debug('nsot external pillar found a match!')
              get_pillar = True
              break
          log.debug('nsot external pillar unable to find a match!')
      return get_pillaf _check_regex(minion_id, regex):
      '''
      check whether or not this minion should have this external pillar returned
  
      :param minion_id: str
      :param minion_regex: list
      :return: bool
      '''
      get_pillar = False
      for pattern in regex:
          log.debug('nsot external pillar comparing %s with %s', minion_id, regex)
          match = re.search(pattern, minion_id)
          if match and match.string == minion_id:
              log.debug('nsot external pillar found a match!')
              get_pillar = True
              break
          log.debug('nsot external pillar unable to find a match!')
      return get_pillar
docs: check whether or not this minion should have this external pillar returned
  
      :param minion_id: str
      :param minion_regex: list
      :return: bool