@tbradley was referring to a number different issues with your description.
One is that you haven't been clear about the problem you are running into with this code. What text is it that you expect your regex to match? There is just too much code to wade through. Analyzing a problem with grep doesn't need a loop, you should prune the code to the part that doesn't work.
What you have here isn't a reprex. As is it isn't executable code because of the printer's quotes (“”) in it. If this was a reprex those quotes would straight quotes.
You need to highlight the code you want to turn into a reprex then run reprex() from the console. Look at the link @tbradley pointed out.
In any case here is an example that prunes your code down to the the specific string that isn't matching.
allFiles <- c("150413_JF_GPeps_nonSID_GPstdMix_ctryp_2ndHILIC_SEv1.mzML",
"150413_JF_GPeps_nonSID_GPstdMix_Tryp_SEv1.mzML",
"150413_JF_GPeps_nonSID_GPstdMix_Tryp_SEv2_OMS_len3_mz400_0.025isoT_0.04gapT_BP1.5_BYtbl_v2.5_TABLE.tsv",
"150413_JF_GPeps_nonSID_GPstdMix_Tryp_SEv2.mgf",
"JF_160426_Dep2Plas_tryp_Gpep_inj2_SEv2.mgf", "
JF_160426_Dep2Plas_tryp_Gpep_inj3_SEv2.mgf")
# the following fails to find match
grep("150413_JF_Gpeps_nonSID_GpstdMix_Tryp_SEv2.mgf", allFiles,
# "150413_JF_GPeps_nonSID_GPstdMix_Tryp_SEv2.mgf"
value = FALSE, fixed = T)
#> integer(0)
# Notice that the closest match in allFiles has a case mismatch.
# When fixed = TRUE you can't use ignore.case because it will
# be ignored. fixed = TRUE requires an exact match
Created on 2018-03-03 by the reprex package (v0.2.0).
This shows that in fact there should be only two matches found by your code.
Also this shows that when you run into problem in a large piece of code, especially a loop, you have to do some work to prune out a simple example to work with. In many cases, as is here, just doing that will find the solution to the problem you are having.