# Untested for file name with space. $base_name =~ m{ \A $input some-fixed-string .*? [.]pdf \z }x;