Three quick observations:
You can make the match more efficient by anchoring it to the end of the string: m/(.{10,}XYZQW.*\.csv$)/i
.{10,}.* says “match at least 10 characters, followed by 0 or more characters”. It is equivalent to .{10,} by itself, i.e., the additional .* is redundant.
The /g modifier is also redundant here.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Best way to match a file.
by Athanasius
in thread Best way to match a file.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |