The logic of what you are trying to do eludes me, can you be more specific? Why not just pass your script an appropriate regex string:
$_ = 'some.567.jpg'; m/^[^\.]*\.(\d+)\.(\w+)$/; print "$1 $2"
This will capture the digits and extension into $1 and $2 but I fail to see how one might extrapolate that from a string like 'numberedfiles.@.tif' as this does not give sufficient detail of what is required. It seems to me that by the time you develop a pseudo language to describe what you want you might as well just use the Perl RE language - after all that is what it is designed for.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Building regexp from a 'mask' string of placeholders.
by tachyon
in thread Building regexp from a 'mask' string of placeholders.
by submersible_toaster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |