Adding to the recommendation to use opendir/readdir, I'm wondering if by "specific" name format you meant filenames that include the pattern you've given us, or filenames that are matched in their entirety by that pattern. If the latter, then you'll need to add anchors, as follows:
/^[A-Za-z]{2}_\w{2,5}$/ ^ ^
In reply to Re: glob and regex
by dws
in thread glob and regex
by AlisonA
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |