[Source] http://zh-cn.w3support.net/index.php?db=so&id=613022
1. M-x replace-string ; \n
will replace ";" with 2 characters "\n".
2. M-x replace-regex ; \n
get a error msg:
Invalid use of `\' in replacement text.
in this mode use C-q C-j to insert a RET into the string you current edited for replace/replaced.
The author also said that you could paste a RET into the string for instead the method above, but i have not tested that.