Returns a list with the names matching the pattern.
762613
def filter(self, names):
        
        names = list_strings(names)

        fnames = []
        for f in names:
            for pat in self.pats:
                if fnmatch.fnmatch(f, pat):
                    fnames.append(f)

        return fnames
1160248
def _get_named_patterns():
    """"""
    resolver = urlresolvers.get_resolver(None)
    patterns = sorted([(key, value[0][0][0])
                       for key, value in resolver.reverse_dict.items()
                       if isinstance(key, string_types)
                       ])
    return patterns
467113
def as_list(self):
        
        self._sanitise()
        l = []
        for name in self.names:
            l.append(getattr(self, name))
        return l
1102373
def names(self):
        """"""
        if getattr(self, 'key', None) is None:
            result = []
        else:
            result = [self.key]
        if hasattr(self, 'aliases'):
            result.extend(self.aliases)
        return result
368715
def names(self):
        """"""
        #This is where the context information is extremely useful in 
        #limiting the extent of the search space we need to examine.
        if self._names is None:
            attribute = self.get_attribute()
            if self.context.module is not None:
                symbol = self.context.symbol
                fullsymbol = self.context.full_symbol
                self._names = self._complete_el(symbol, attribute, fullsymbol)
            else:
                self._names = []

        return self._names
1101763
def names_from_exp(exp):
  ""
  def match(exp):
    return isinstance(exp, (sqparse2.NameX, sqparse2.AttrX))
  paths = treepath.sub_slots(exp, match, match=True, recurse_into_matches=False)
  return [exp[path] for path in paths]
183336
def names(self):
        """"""
        names = []
        if isinstance(self.source, ast.List):
            for node in self.source.elts:
                if isinstance(node, ast.Str):
                    names.append(node.s)
        return names
585176
def _load_names(self) -> List[str]:
        
        names = []
        for path in self._get_files():
            for name in self._get_names(path):
                names.append(self._normalize_name(name))
        return names
1130204
def _keys(self, pattern):
        
        result = []
        for client in self.redis_clients:
            result.extend(list(client.scan_iter(match=pattern)))
        return result
694100
public static List<Pattern> getPatternsFromStrings(List<String> strings) {
    List<Pattern> patterns = Lists.newArrayList();
    for (String s : strings) {
      patterns.add(Pattern.compile(s));
    }
    return patterns;
  }
969978
private Set<String> getSearchIndexNames() {

        Set<String> names = new HashSet<String>();
        @SuppressWarnings("unchecked")
        Set<I_CmsSearchIndex> indexes = (Set<I_CmsSearchIndex>)getValue();
        for (I_CmsSearchIndex index : indexes) {
            names.add(index.getName());
        }
        return names;
    }
246098
def get_all_names(self):
        """"""
        result = set()
        for module in self.names:
            result.update(set(self.names[module]))
        return result
722373
def match_filenames(filenames, pattern):
    """"""
    matching = []

    for filename in filenames:
        if fnmatch(get_filebase(filename, pattern), globify(pattern)):
            matching.append(filename)

    return matching
16609
def all_patterns(name):
    
    """

    # i_ denotes an import-like node
    # u_ denotes a node that appears to be a usage of the name
    if u'.' in name:
        name, attr = name.split(u'.', 1)
        simple_name = simple_name_match % (name)
        simple_attr = subname_match % (attr)
        dotted_name = dotted_name_match % (simple_name, simple_attr)
        i_from = from_import_match % (dotted_name)
        i_from_submod = from_import_submod_match % (simple_name, simple_attr, simple_attr, simple_attr, simple_attr)
        i_name = name_import_match % (dotted_name, dotted_name)
        u_name = power_twoname_match % (simple_name, simple_attr)
        u_subname = power_subname_match % (simple_attr)
        return u' | \n'.join((i_name, i_from, i_from_submod, u_name, u_subname))
    else:
        simple_name = simple_name_match % (name)
        i_name = name_import_match % (simple_name, simple_name)
        i_from = from_import_match % (simple_name)
        u_name = power_onename_match % (simple_name)
        return u' | \n'.join((i_name, i_from, u_name))
1233915
def get_match_names(match):
    """"""
    names = []
    if "paren" in match:
        (match,) = match
        names += get_match_names(match)
    elif "var" in match:
        (setvar,) = match
        if setvar != wildcard:
            names.append(setvar)
    elif "trailer" in match:
        match, trailers = match[0], match[1:]
        for i in range(0, len(trailers), 2):
            op, arg = trailers[i], trailers[i + 1]
            if op == "as":
                names.append(arg)
        names += get_match_names(match)
    return names
325578
def query_names(self, pat):
        """"""

        for item in self.chnames.items():
            if fnmatch.fnmatchcase(item[1], pat):
                print item
576040
public static List<Match> search(Match m, Pattern pattern)
	{
		assert pattern.getStartingClass().isAssignableFrom(m.get(0).getModelInterface());

		return searchRecursive(m, pattern.getConstraints(), 0);
	}