« Using Scenarios in OpenOffice Calc spreadsheets to figure out what to do | Main | Follow me on twitter! (updated link to new ID) »

November 02, 2009

Comments

One thing to look out for using the ^$ string: if you have different paragraph styles on either side of the empty paragraph, one of those styles will become the other.

I usually Replace All with any long document, then scroll through and look for any anomolies especially where I have headings or blockquotes.

Good point pond; different adjacent paragraph styles will be combined.

Is there any way to make it faster? It took a lot of time when I tried it on a lengthy document.

Hi Shantanu,

Just the usual; close all other programs and processes.

How change 2 empty lines to one

Is there any way to remove the soft carriage returns for only selected areas of a document? The intent is obviously to enable a line-length change to text containing soft carriage returns while leaving other portions of the text file untouched. It seems like the search \n or $ options are an all-or-nothing method.

Pico does it a paragraph at a time with control-j. That's what I'd like!

Hi Bev,

You can select nonconsecutive parts of the document (Ctrl select) and then apply the s/r to only selection. You might also be able to do it using more sophisticated regular expressions. Press F1 for the help and search for regular expressions; there's a bunch of stuff in there.

I assume control-select means control-select-with-the-mouse, right? Thanks, I'll try that next time I have one of the nasty text files to fix. I'm surprised that there isn't a one-step way to do it -- even WordStar had that facility!

There seem to be a lot of unexpected and unfortunate behaviors in this feature.

First of all, it should be possible to select a whole paragraph *except* for the last carriage return and use Replace All to eliminate all the other carriage returns. This would speed the process up considerably. (I don't think the user above was worried about an overloaded processor.) But I can't find any way to do it. No matter what I select it doesn't behave as I expect or want it to.

It should be possible (as the user above asked) to replace two empty lines with one. Nope. If I put ^$^$ in the search box, I get "Search key not found." And I get the same result with every variation I can think of, i.e., $$, ^$$, and $^$.

Another available strategy should be to (1) globally replace double returns with a unique string (like DOUBLERETURN); (2) globally replace all remaining (single) returns with a space (or nothing); and (3) globally replace DOUBLERETURN with two returns. Voila, you've stripped out all the returns except the ones you want, at the ends of paragraphs. But I see no way to do this with OO because it apparently can't be made to find a string of returns.

I've had to clean up scanned text where there were random numbers of extra returns, maybe as many as four or five in a row. The quickest way I know to do it is to globally replace three returns with two (or two with one, depending on the intended end result) and repeat this process until the search string is no longer found. But again, no go in OO.

This is the kind of thing that forces me back sorrowfully to Word. I'd love to ditch it, especially now that MS has forced the worst "upgrade" in recent history down my employer (and thus my) throat. But OO just doesn't seem ready for prime time, at least for power users.

I might have missed it...but in doing my search and replace functions I often find that I need to replace "something" BEFORE a carriage return, with nothing. As an example often, I find that there are unwanted spaces before a carriage return, and when using a text file which will be subsequently imported into a database those spaces are problems. I have been looking now for about an hour for how to search for the combination of "space" and "carriage return" and not having luck. Perhaps the combination of hex characters representing the space and carriage return would work? Haven't tried that yet. Finding the "$" for searching for carriage returns was great...but after that I have been stymied.

Same comment as Drew above...this is the kind of thing that sorrowfully forces me back to Word, as it is easily done with a caret and some other letters and spaces, but OO is not making it intuitively difficult let alone easy, for me to do this.

Yes, the power users need work to much with all forms of characters. To clean docs that comming from other sides and containing spaces before a carriage return when is not necesary; well, I hope see this soon in OO...I will not to use Word for ever.

A Google search for this problem lead me here. This is an annoying problem - finding multiple paragraph marks (ie $$ etc). After reading the discussion I resorted to a desperate, un-elegant, but successful solution. With regular expressions enabled, search for $ (one paragraph mark) and globally replace this with XXXX (four Xs); repeat this until "Search string not found". Now the solution is painful, but effective: search for XXXXXXXX and globally replace with \n. Finally, search for XXXX and globally replace with \n. Obviously you can use something other than XXXX. As I said, painful, but effective.

Bill's solution didn't quite work for what I want to do, but it is better if the last S/R is XXXX replaced by a blank space.
My own interest is in moving from .txt files with a $ at the end of each line, $$ at end of paragraphs, to simple paragraphs that I can then shift into readable HTML. So Bill's $ -> #, repeated, then ## -> \n, # -> blank, and later $ -> \n works for me. Pity it's easier in Word, but I'm glad it's possible in OO. (Saving the other way round, however.....?)

Where I have "So Bill's $ -> #, repeated, then ## -> \n, # -> blank, and later $ -> \n works for me" what I actually wrote had bits of HTML in it which doesn't seem to want to be reproduced. So later was a matter of replacing the carriage returns with the HTML paragraph code in reverse order for my convenience (diamond bracket backslash p, diamond-bracket diamond bracket p diamond bracket) with a carriage return in between.

When I use the $ to search for carriage returns or paragraph marks I get nothing. What am i missing here?

"One thing--you can't replace something with soft returns. As you see, a \n in the Replace field turns into a normal hard return."

Can this be true? If so, it's another reason I'm considering going back to MS Word (which I *really* want to avoid, but I need to use whatever tool will get the job done).

The distinction between a paragraph mark and a line-break is SO fundamental and basic, I can't believe that OO Writer doesn't let you treat them differently in Search-and-Replace.

In case anyone's interested, here's why I need it. It is conventional when transcribing handwritten documentary sources to indicate line-breaks with a slash: "/". But now I want to replace these marks by real line-breaks in a long document. Apparently Writer will only let me replace them with paragraphs. Really dumb! Or am I missing something?

Hi Peter,

Try this extension.
http://openoffice.blogs.com/openoffice/2010/07/fantastic-openofficeorg-writer-extension-for-searching-and-replacing-carriage-returns-two-in-a-row-e.html

Solveig

The comments to this entry are closed.

GetOpenOffice Consulting

Get Book Resources

Search This Blog


Categories