i created a small test document using your logic and it worked fine with multi-line text. The logic correctly removes the newline and adds the space.
It sounds like you might be using rich text?
When using rich text, XML tags are sent in the value from uStore to the plan file. so, you need to match more than just the new lines.
This regex version works in a quick test:
FindAndReplace(FindAndReplaceByRegExp(@{text}, "</?[^>]+>\r?\n?|\t+| {2,}", "", false), "\n", " ")
It is designed to remove:
* any html/xml tags from the value including any newlines added after the tags
* any tabs (since the xml is nicely structured with tab indents)
* and any instances of two or more spaces together. (this is possibly not needed and was added when I thought the structuring was with spaces, but it turned out to be tabs)
It then uses your regular findAndReplace to change newlines to spaces.