Replacing all breaks in textfield for spaces

1
How can I replace all breaks in a textfield for spaces. I guess I have to use the function replaceAll(text, regex, outcome). I'm not that great with regex though, could anyone help me with his one?
asked
2 answers
5

You should use the following microflow expression:

replaceAll($Entity/StringAttr, '\s+', ' ')

This will transform texts such as 'Some     text.

Some more      text.'

into

'Some text. Some more text.'

answered
1

The regex will also take literal strings, so just replacing all '\n' (without quotation marks) should work.

answered