Just to clarify:
I supposed that you wanted to remove a line return “\n” - you need two back slashes ahead \\+\n
This happens to characters that has a meaning in regex.
i.e. If you have a pipe “|” in your text, this symbol means OR in regex. To tell regex that you ar working with a string , then you need to indicate that pipe is a text with a double back slash ahead: \\+| == “\\|”
I can’t see further unless you can share some sample of your data.