Extract EOF from file giving a delimiter