So the problem is: why does
This can be broken down into four parts:
a_ matches the beginning of
clean_0db_data to be matched
[a-z] matches any character in the range
lean_0db_data to be matched
* matches any number of characters, e.g.
_data matches the trailing
In regular expressions,
[a-z]* would mean any number of characters (including zero) in the range of a..z, but you are dealing with shell globbing, not with regular expressions.
If you want regular expressions, a few
find implementations have a
-regex predicate for that:
find . -maxdepth 1 -regex "^.*/a_[a-z]*_data$"
-maxdepth is only here to limit the search-results to the folder you are in.
The regular expression matches the entire filename, therefore I have added a
^.*/ to match the path-portion