This will replace each occurrence of `\r\n` with *two* spaces, which I'm pretty sure is not your intention. `/[\n\r]+/` might be what you're after.