Fixed regex for end of file