function getFileByFileName(data) {
  const version2RegExp = getVersionRegexp(GENERIC_VERSION2),
    version3RegExp = getVersionRegexp(GENERIC_VERSION3);
  let file = data.map((element) => {
    return fs.readFileSync(element.fileName, 'utf8');
  }).find((content) => {
    return content.match(version2RegExp) || content.match(version3RegExp);
  });
  return file;
}
When the array of files is provided as a list of file's paths it returns the
content of the file that contains the version data
@param {array} data The array of files in the folder provided by the user
@returns {string} the content of the file that contains the version data