def get_placeholders_list(self, format_string, matches=None):
if format_string not in self._format_placeholders:<EOL><INDENT>placeholders = self._formatter.get_placeholders(format_string)<EOL>self._format_placeholders[format_string] = placeholders<EOL><DEDENT>else:<EOL><INDENT>placeholders = self._format_placeholders[format_string]<EOL><DEDENT>if not matches:<EOL><INDENT>return list(placeholders)<EOL><DEDENT>elif isinstance(matches, basestring):<EOL><INDENT>matches = [matches]<EOL><DEDENT>found = set()<EOL>for match in matches:<EOL><INDENT>for placeholder in placeholders:<EOL><INDENT>if fnmatch(placeholder, match):<EOL><INDENT>found.add(placeholder)<EOL><DEDENT><DEDENT><DEDENT>return list(found)<EOL>
Returns a list of placeholders in ``format_string``.

If ``matches`` is provided then it is used to filter the result
using fnmatch so the following patterns can be used:


.. code-block:: none

    * 	    matches everything
    ? 	    matches any single character
    [seq] 	matches any character in seq
    [!seq] 	matches any character not in seq

This is useful because we just get simple placeholder without any
formatting that may be applied to them
eg ``'{placeholder:.2f}'`` will give ``['{placeholder}']``