import re


def get_file_id(files, file_id_re):
  """ get the file id using the file id regular expression
  Args:
    files: list of input file paths
    file_id_re: regular expression string used to detect the file ID
      from the file path

  Return:
    a dictionary of file id and its full file path
  """
  id_files = {re.findall(file_id_re, x)[0]: x for x in files}
  return id_files