/a-z.+\.txt/
If /[a-z].+\.txt/ is the regex you're using (a bit difficult to tell because you don't use <code> ... </code> tags), then it will match a string with a lower-case letter anywhere in it, followed by one or more of anything except a newline, followed by '.txt' and then followed by anything. I recommend using string anchor assertions (untested):
my @files = grep m{ \A [a-z] .* \.txt \z }xms, readdir $dh;
(which also allows for single-letter file names). Please see perlre, perlrequick, and perlretut.
Give a man a fish: <%-(-(-(-<
In reply to Re: regex to capture only lower case
by AnomalousMonk
in thread Reaped: regex to capture only lower case
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |