Hi, me again.
So try this:
trim(replaceAll($Notes/Notes, '[ \t]*\R[ \t]*', '
'))
What it does:
look for spaces/tabs before and/or after a line break (\R) and replaces them with just a line break. Then trim the result to remove spaces from beginning or end.
Normally, your proposed solution should work. Are you expecting [\t]+ in the middle of your notes attribute as well, or only at the beginning? Otherwise you could simply replace your replaceall with quotes instead of a space.
When I try to reproduce your case, it works normally for me, all the spaces are removed at the start and the end of the string. Have you tried debugging to see what your string changes to after you do the replaceall? There might be a hint there.
And after a replaceall and trimming:
Hi Jessica,
So, if I understand you correctly, you have a text with multiple lines and each line could have leading and trailing spaces. I'm not sure if this is possible with the replaceAll() function, but this might be an alternative that could work.
If you have the following string:
Test 1
Test 2
Test 3
This would be the result:
Test 1
Test 2
Test 3
Please note, if it would be possible through the replaceAll() function, that would be better and less work :)
Hope this helps,
Regards, Jeroen
Hi Martin,
Thank you for helping again. I very much appreciate it! It fixes one issue but then there is now another one. Though I am confident now it must be able to be done this way!
Results in the below – It trims it to the edge but now no longer trims in between.
Thank you to all the answers! I would be lost without this forum!
Jess