Page 1 of 1
[Dropped] Find & Replace
Posted: Tue Jun 03, 2025 3:47 am
by cabbie
Imtrying to setup a popup Starting off with ADAMS I want end result of
ADAMS <br />
<a href=" h ">Sheriff</a><br />
<a href=" ">Government</a><br />
< a href=" "> Judicial</a><br />
<a href="
https://en.wikipedia.org/wiki/Larimer_,_Colorado"> Wiki</a><br />
<a href=" ">Rumble Channels</a>
I dont know if ADAMS is nested with <p></p> but using wildcards can I in one operation put all thatin replace with ahidden carriage rteurn? It gets omplicated to this oldman..
Re: Find & Replace
Posted: Tue Jun 03, 2025 4:36 pm
by floris v
If you want to edit HTML files, you should really use a real HTML editor.
Re: Find & Replace
Posted: Tue Jun 03, 2025 5:24 pm
by RoryOF
I agree with floris v: a html editor is the best way to go.
To clarify your problem:
Do you wish to search a file for the specific tag ADAMS and replace every occurrence of it by the text you have given? Or do you want to search other tags, of which ADAMS is a sample case, and replace each with the given text string. Or would the replace differ according to the specified tag?
Re: Find & Replace
Posted: Wed Jun 04, 2025 5:46 am
by cabbie
Re: Find & Replace
Posted: Wed Jun 04, 2025 2:39 pm
by RoryOF
No doubt: but that doesn't answer any of the questions I asked as to your use case.
Re: Find & Replace
Posted: Wed Jun 04, 2025 11:12 pm
by floris v
cabbie wrote: ↑Tue Jun 03, 2025 3:47 am
... but using wildcards can I in one operation put all thatin replace with ahidden carriage rteurn? It gets omplicated to this oldman..
You can put all of those in a single replace command in any scripting language. IIRC, you can have the entire code on a single line and a browser will display it as if it were over several lines, so you won't need hidden line breaks. I'm not sure that you can pull it off in the HTML editor of AOO or LibreOffice.
Re: Find & Replace
Posted: Thu Jun 05, 2025 10:40 am
by RoryOF
The easiest course I see is this:
Make a copy of the file, and work using it (in case there is a disaster!).
Use an archive utility such as winzip (or similar) to expand the .odt file and right click on content.xml. Choose "open with" and select the XML editor you have earlier downloaded (I use XML Copy Editor).
Use its search and replace facilities to make your substitutions. Then Save that content.xml in the XML editor. You should be prompted to update content.xml in the copy file. Select to do that, then close the opened copy file.
After suitable prayer and fasting, or sacrifices, or whatever invocations you deem appropriate to the deities of Computers, open the (hopefully now altered) copy file in OpenOffice and see if all is well.
If not, revert to the original and start again.