alert(' 111 \nдата1 \nдата2 \nдата3'.replace(/дата(\d+)/g, (m, n) => new Date(Date.now() + (n - 1) * 1000 * 60 * 60 * 24)))