Correct type doc for replace's second param