in reply to removing new line character embedded in multi-line string
Where does your input text come from? Sounds like you have Windows/DOS line ends (CR/LF pairs) and your *nix script is removing the LF (\n), but not the CR (\r). You may find s/\s*[\r\n]+\s*/ /g cleans things up for you.
|
|---|