Not quite sure what you mean by "empty last line".
There are two variations of this that I can think of.
I'm assuming both cases are at the end of the text.
We'll need a custom cleaner with a regular expression action to accomplish this.
In both cases, we want to anchor it to the end of the text. In this case, we'll got with \Z which anchors to the end of the input (text).
1) blank line (as in just a return)
- Find and Replace Text
| type: regex
| options:
| find: \n+\Z
| replace:
This actually will remove one or more \n from the end of the text. The replace is empty, which effectively deletes the matched text.
2) line with just spaces and return
- Find and Replace Text
| type: regex
| options:
| find: \x{20}+\n\Z
| replace:
This one is a little different. It matches one or more \x{20} (which is hex for a space) followed by a return and end of input. Again, the replace is empty to delete the matched text.
This specifically leaves additional returns.
Another option is similar, but will remove any whitespace (returns, spaces, tabs) from the end of the document.
- Find and Replace Text
| type: regex
| options:
| find: \s+\Z
| replace:
\s is the special regex sequence that specifies a whitespace character. The + indicates one or more of the preceding character. The \Z is anchors this match to the end of the text. Finally, the blank replace means we'll delete this match.
You can find more information about the character sequences in regex by selecting Help > Regex Reference in TextSoap.
The regular expressions feature is very powerful, but does have a learning curve.