code: def filter_components(self, pattern, category=None):
          
  
          filtered_components = []
          for component, profile in self:
              if category:
                  if profile.category != category:
                      continue
  
              if re.search(pattern, component):
                  filtered_components.append(component)
          return filtered_components
docs: Filters the Components using given regex pattern.
  
          Usage::
  
              >>> manager = Manager(("./manager/tests/tests_manager/resources/components/core",))
              >>> manager.register_components()
              True
              >>> manager.filter_components("\w+A$")
              [u'core.tests_component_a']
  
          :param pattern: Regex filtering pattern.
          :type pattern: unicode
          :param category: Category filter.
          :type category: unicode
          :return: Matching Components.
          :rtype: list