Posted: Mon May 23, 2005 2:53 pm Post subject: Find and replace
I'm hoping someone here will be able to help me get rid of MS Office from my machine.
Just about the only reason I keep it is that I can do the following in Word, but not in NeoOffice (and I have the latest version, with patches)
Find two successive newlines
Replace them with tab
Find all other newlines
Replace them with space
Find all tabs
Replace them with two successive newlines.
Please don't bother to just tell me to look at regular expressions in the Help file. I've spent hours trying just about everything I can find in there with no luck. I've asked the OpenOffice support forum and that is all they can come up with. I'm looking for specific advice, here
Is this possible in NeoOffice or is there something Word can do that NeoOffice/OpenOffice can't?
Joined: Sep 08, 2003 Posts: 63 Location: Teesside, UK
Posted: Mon May 23, 2005 6:38 pm Post subject:
Hi,
What I think you want to do can be accomplished by:-
{Regular expressions on. You don't type any quote marks, but I need them so I can show a " "}
Search for "^$"
[This is a specific code for a blank paragraph]
Replace with "\t"
Find all/replace all
-----------------------
Search for"$"
Replace with " "
Find all/replace all
-------------------------
Search for "\t"
Replace with "\n\n"
Find all/replace all
Close find box.
This is much harder to do than it should be, and requiring different codes in the replace box from those in the find box is so unintuitive I'd call it a bug...... but it is OOo's bug, and we're stuck with it
The official OOo way of fixing hard-wrapped text is via autoformat, but it tries to be too clever, and won't take out an unwanted newline if it coincides with the end of a sentence.
Luke, you seem by far to be the resident expert on Find and Replace. When you get a chance, would you mind filling in "Find and Replace" article in the wiki a little bit?
Joined: Sep 08, 2003 Posts: 63 Location: Teesside, UK
Posted: Tue May 24, 2005 5:21 pm Post subject:
Hi,
I certainly would not claim expertise here - I had no idea what the answer (if it is the right answer) to owenkc's question was until just before I posted it.
I've taken the last couple of find and replace queries as they are well defined problems, susceptible to solution by setting up a test document and playing with the options suggested in the online help until it works as required. If this results in some useful information for the community, and saves Ed/Patrick a few minutes, I'm happy.
Hi,
I certainly would not claim expertise here - I had no idea what the answer (if it is the right answer) to owenkc's question was until just before I posted it.
I've taken the last couple of find and replace queries as they are well defined problems, susceptible to solution by setting up a test document and playing with the options suggested in the online help until it works as required. If this results in some useful information for the community, and saves Ed/Patrick a few minutes, I'm happy.
Well, insomuch as there is an expert around here, I think you are he, whether you are an expert in the absolute sense or not And the wiki entry is good; I think I finally understand those parts now, so thanks!
Luke wrote:
PS Your wiki link shows as underlined, but "wiki entry" above is the same link, but it is not underlined. Looking back through a few old posts, I see some links underlined, others not. Weird.
That's odd; both are showing up for me, in all the browsers on my Mac.... Prior to this weekend, links that were "plain URLs" showed up underlined, but "composed links" with text (i.e., [ url= http: // foo ]bar[ /url ] links) were not underlined. But Ed fixed the stylesheet to always underline those links this weekend, an all of them are showing up underlined for me....
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum