Replace all newlines with a space

Hello, I would like to know how I could replace with an assing, all the line breaks and convert them into a space

thanks

Hi @joseantonio - Do you have any sample text? I thought you were all set , because i saw someone already solved this morning right??

varStr.Replace(Environment.NewLine," ")

strVar = System.Text.RegularExpressions.Regex.Replace(strVar, “\r\n”, " ")