You don't say what shell you are using, but they generally don't support regular expressions that way, although there are common *nix CLI tools (grep
, sed
, etc) that do.
What shells like bash do support is globbing, which uses some similiar characters (eg, *) but is not the same thing.
Newer versions of bash do have a regular expression operator, =~
:
for x in `ls`; do
if [[ $x =~ .+\..* ]]; then
echo $x;
fi;
done