We have test like below
" Need modification.
Remove last line
"
In this example, we just need to remove next line char after remove last line string. We still need to keep next line after Need modification.
We are generating some documents and formatting should not change if users has entered next line in between the lines but only last line should be removed as soon as Users entered Save.
trim will not work here as it will remove from all the text
Discussion posts and replies are publicly visible
This does require an Appian developed plugin ( Regular Expression Functions) but is the quickest way I can think of. It just says replace any new line or carriage return at the end of an input and replace it with nothing.
a!localVariables( local!input: " Need modification. Remove last line ", regexreplaceall( "(\r|\n){1,}$", local!input, "" ) )
The regular expression "(\r|\n){1,}$" means: