If you want to replace some string with another string that contains, a carriage return using the find/replace panel in TextEdit (or other Cocoa apps), it typically involves selecting a carriage return in the text and copy/pasting it into the Replace text field.
However, you can enter a carriage-return (or any other "special" keystroke like "Tab") into the Replace field by prefixing it with a Control-Q. That is, if you wanted to find all occurrences of ';' and replace them with ';[Return]', you would type a bare ";" into the Find field, and then type ';[Control-Q][Return]" into the replace field (that is: a semicolon, then a Control-Q, then hit the Return key).
Histroy: Control-Q is the keybinding used by emacs that basically tells emacs to insert the next typed character as a raw keystroke instead of going through the normal input-and-interpret engine. This should work in any Cocoa application.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021009063151561