Removing all line breaks in a chunk of text

Hello, I'm having trouble figuring out how to remove all line breaks from a chunk of text.

I'm copying text from PDFs which adds paragraph breaks between lines which I want to remove.

It seems it adds both a \n and a \r to the lines because neither

{=replaceregex({clipboard}, "\n", " ", "sg")}


{=replaceregex({clipboard}, "\r", " ", "sg")}

do anything

I tried

{=replaceregex({clipboard}, "[\n\r]", " ", "sg")}

which replaces new lines with two spaces


{=replaceregex({clipboard}, "\n\r", " ", "sg")}

does nothing.


nevermind, solved my own issue, I had the order wrong

the correct snippet is

{=replaceregex({clipboard}, "\r\n", " ", "sg")}


Welcome to the Forum! If there is anything else we can do to help or you have more questions, please let us know.