Cosmological Peregrine soliton