[Solved] Finding and replacing newline characters

Discuss the word processor
Post Reply
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

[Solved] Finding and replacing newline characters

Post by ptoye »

I have an imported text file, and want to delete the newline whenever the line ends with an equals sign. Is there any way to do this using find/replace? Or any other way, for that matter? Apart from writing a Java program to do it. The sort of thing that awk and ed can do in a few lines.
Last edited by Hagar Delest on Wed Dec 29, 2010 12:46 am, edited 1 time in total.
Reason: tagged [Solved].
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
Robert Tucker
Volunteer
Posts: 1250
Joined: Mon Oct 08, 2007 1:34 am
Location: Manchester UK

Re: Finding and replacing newline characters

Post by Robert Tucker »

Probably easiest to do with AltSearch.
LibreOffice 7.x.x on Arch and Fedora.
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Finding and replacing newline characters

Post by ptoye »

Not heard of that one. Thanks. I'll try it. It doesn't come with a README - is installation and operation intuitive?
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Finding and replacing newline characters

Post by RoryOF »

Reasonably so. Be advised that OOo has restrictions on paragraph length arising from programming decisions made years ago; it doesn't like paras longer than 64K characters, which is reasonable enough in terms of reading comprehension, but which situation can effectively arise in circumstances of removing paragraph marks/line feeds. Best in those circumstances to maintain a master copy of your file in case of disaster.

How is the snow in Reading?
 Edit: You may find it of use to look at
http://user.services.openoffice.org/en/ ... 29&start=0 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Finding and replacing newline characters

Post by ptoye »

Rory, thanks.

As the lines whose line end character need deleting are (without exception) followed by lines where it isn't deleted, the 64k restriction isn't an issue, but thanks for the warning.

I've installed the addon by double-clicking on the .oxt file but when I click on its icon nothing at all happens. I've a nasty feeling it's a permissions issue, but don't really know where to go from here.
Peter
OO 4.1.1 on MS Windows 7 64-bit
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Finding and replacing newline characters

Post by ptoye »

RoryOF wrote: How is the snow in Reading?
Not bad, it's just above zero at the moment, so it's slowly melting. And we never had more than about 10 cm. Other places had it a lot worse. How's yours?
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Finding and replacing newline characters

Post by RoryOF »

In OpenOffice / Tools / Extension Manager does Alternative Searching show up as an installed Extension? If not, click on the Add button on bottom of that window and point it to the AltSearch.oxt file you have downloaded. I then had to restart Openoffice before there was an entry under
/ Edit / Alt Find and Replace which opens the Alt Find and Replace dialog.

12" of snow last night on 6" lying (left after 24" during last three weeks). Well stocked with food. Main road running slowly, but running. Car blocked in by 100yds drive covered by 12" snow. Plenty of food and oil. OK so long as electricity/phone don't fail.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Finding and replacing newline characters

Post by ptoye »

Managed to install it OK now and all working fine. Thanks for the pointer.

Snow all gone now.
Peter
OO 4.1.1 on MS Windows 7 64-bit
Post Reply