here's a quick code snippet to replace windows-style line breaks (CRLF, or carriage return, line feed) with a standard actionscript new line character.
var newText:String = oldText.replace(/\r\n/g, "\n");
and here's a snippet to replace all multiple line breaks with a single new line character:
var newText:String = oldText.replace(/[\r\n]+/g, "\n");
for example, the preceding code would change the following string: