In addition to the answers explaining what the regex does (match all \n's without a \r before it), I'd just like to point out that this use of Replace() is most likely never necessary, unless you have users hellbent on typing just \n's somehow. And even then, you probably don't need it on the keypress, just when the text as a whole is used (i.e. after the data is submitted somehow).
And if that was put in there to sanitize copy-pasted text, then you can refactor it to only run when a large amount of the text has been changed.