Allen wrote:
I have a rather large log file I need to get into a spreadsheet. Most
I can handle just fine with search and replace but one search I can't
figure out, the paragraph marker at the end of a line. In Word it is
^p. What is it in OO? The only thing I find is, "\n in the Search for
text box stands for a line break that was inserted with the
Shift+Enter key combination." I want to replace one or more spaces
and the "enter" paragraph marker with just the paragraph marker. I
know \n in the "Replace with" will do that part, bu I don't know how
to find the regular paragraph enter marker. I can't just replace
spaces with nothing as that would make a jumble of the words in about
5000 lines.
Make sure “Regular expressions” is selected.
Enter “ *\n” without the quotation marks as the “Search for” expression.
The newline expression stands for a line break when used in a “Search
for” expression. The asterisk indicates “zero or more of the preceding
character”. Here the preceding character is the normal space character.
Be sure you insert that space. The expression indicates that Find is to
search for any line breaks preceded by zero or more spaces.
Enter “\n” without the quotation marks as the “Replace with” expression.
The newline expression stands for a paragraph break rather than a line
break when used in the “Replace with” expression. (We all know that it
is annoyingly unintuitive and plain stupid that \n means line break in a
“Search for” expression and as paragraph break in a “Replace with”
expression but we have to live with it if we use the standard OpenOffice
Search & Replace procedure.)
Then mouse-press the “Replace All” expression and what you want to
happen will happen. Actually, I suggest first mouse-pressing the “Find”
button followed by the “Replace” button if all looks well in order to
check that you haven’t mistyped anything. Then fix the rest through
“Replace All”.
Jim Allan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]