32
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".
Just replace /[\r\n]+/g with an empty string "".
It'll replace all \r and \n no matter what order they appear in the string.