Next problem. The regexpr .*~ succeeds in getting rid of the file~, but leaves an empty paragraph:
Following the openoffice.org wiki (http://wiki.services.openoffice.org/...ns_in_Writer):
^$ will match an empty paragraph, which can be replaced by say nothing, in order to remove the empty paragraph.
gives me "Search string not found."
A bit of experimentation indicates that there are hidden spaces before each new paragraph mark--I can arrow through the spaces, but they do not show with View Nonprinting Characters, the way spaces I enter do. But if I manually remove the spaces, then ^$ works to remove the empty paragraph.
Now my problem is to figure out how to replace all those spaces. Just putting a blank space into the "Find" box doesn't do it, not does using [:space:].