in reply to RegEx is required for the below pattern

Sounds like a job for File::Basename...
use warnings; use strict; use File::Basename; my $path = '/tom/john/jones/fredy/sam-joe/Install-xyz-opq.zip'; my $file = basename($path); print "$file\n"; __END__ Install-xyz-opq.zip