So that's the question...perhaps there's a regular expression for this? Just to be clear, I don't want to remove ALL newlines and bunch all of the code together, only the extras. I'm not familiar with how to construct regexes, so any help is greatly appreciated!
And here's the explanation as to why:
I was obviously ignorant of the troubles the following situation could cause, so you know I'm now fully aware of that! I've submitted c# code on a mac to perforce, which originally came from windows. Now I've updated those source files on my PC, and their line endings are now messed up, with VS 2008 giving me a compiler error, telling me to fix my mac line endings. I found the Stripem VS add-in, which fixes the compile error, but the code looks terrible, with tons of extra lines.
For the regex approach, see if you can match one or both of
\r
or\n
.