I am sure this has been asked before, but I cannot find it.
Basically, assuming you are parsing a text file of unknown origin and want to replace line breaks with so
Fletcher - this did get asked once before.
Here you go: Regular Expression to match cross platform newline characters
The regex I use when I want to be precise is "\r\n?|\n".