Optical regeneration is a key technology for next generation high-speed optical networks. All-optical regeneration can increase the reach of transmission systems without expensive optical-to-electrical signal conversion. Among various regeneration schemes, the Mamyshev regenerator attracted particular attention due to its simplicity and robustness. In this paper, we report an all-optical regeneration of a 40 Gbit/s return-to-zero signals. The regenerator proposed is based on the standard Mamyshev regenerator, which the temporal intensity profile and the average power are recovered. This device allows regenerating the signal without wavelength shift, decreasing the complexity and cost when compared with others 2-R regenerators reported. The input signal is first spectrally broadened, by self-phase modulation, after passing through a highly nonlinear fiber. Afterwards, the signal is amplified by a bidirectional erbium doped fiber amplifier, and offset spectral backscattering sliced by a fiber Bragg grating. In the second stage, the signal is spectral broadening and filtered recovering the input wavelength. The transfer function for the regenerator proposed is measured, and the all-optical regeneration is assessed by means of bit-error-rate measurements as well as real-time observation of the signal.