in reply to Quick Regex question

You might want to leave the job of parsing the filename up to File::Basename:
$full_path ='A:\dir\file.jpg'; $filename = basename($full_path); # file.jpg