regex replace all for string

i have a group of text that pulls in as the following: Morning Jody\n\nAppreciate the feedback, I’ll take a look at it now.\n\nThanks\nJeremy\nTechnical Contact   the \n are supposed to be breaks in the paragraph. i tried using the regex replace all java call but it is not working. can somebody please take a look at my microflow and tell me what i’m doing incorrectly. thanks!
2 answers

The following should replace the \n characters with line breaks,

replaceAll($vText, '\\n', '


You can use it in a Change Variable action like this...

Hope this helps.


I believe you need to match \\n rather than \n as \n will match the actual line break character. Also I’m not sure how you’re using the output string, but if it is being used as html you might want to replace with ‘<br/>’ rather than br. If you’re trying to use it as plain text then perhaps replacing with ‘

‘ would is what you’re looking for.