Use php glob() function
The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells
<?php
$filteredArray = array();
foreach (glob($dir."/*_img.pdf") as $filename)
$filteredArray[] = $filename;
?>
There is also fnmatch() function which matches filename against a pattern
The last solution is to use DirectoryIterator with FilterIterator