replace command works if there's whitespace in the string