Minor fix to replacement regex