Use function directory-files
, for which C-h f
tells you:
directory-files is a built-in function in `C source code'.
(directory-files DIRECTORY &optional FULL MATCH NOSORT)
Return a list of names of files in DIRECTORY.
There are three optional arguments:
If FULL is non-nil, return absolute file names. Otherwise return names
that are relative to the specified directory.
If MATCH is non-nil, mention only file names that match the regexp MATCH.
If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
Otherwise, the list returned is sorted with `string-lessp'.
NOSORT is useful if you plan to sort the result yourself.
In this case, you provide your regexp as argument MATCH
:
M-: (directory-files default-directory nil "[tT]ypolog[yi]")
And you need not be in a Dired buffer to use this.