made regex for index files more rubust