code: public static File[] findMatches( File directory , String regex ) {
  		final Pattern p = Pattern.compile(regex); // careful: could also throw an exception!
  		return directory.listFiles(file -> p.matcher(file.getName()).matches());
  	}
docs: <p>
  Looks for file names which match the regex in the directory.
  </p>
  <p>
  Example:<br>
  BoofMiscOps.findMatches(new File("/path/to/directory"), ".+jpg");
  </p>
  
  @param directory directory
  @param regex file name regex
  @return array of matching files