How to delete all alphabetic index entries at once

In writer I have a large document that I created an alphabetic index for. I have chosen to delete the index as I want to create another one. However, deleting the index does not remove all the index entry fields within the document. Is there any way to do this automatically without manually going through the whole document?

Have a look to the explanation from @Regina

Thanks for the answer. But I am looking for an automatic solution. The document is too large to go through and delete everything manually that way.

1 Like

It is almost 5 years later and it seems there is no solution to this. I have a document of 314 pages, and 154,000 words. I will sit forever trying to do this manually.

Another problem is that after deleting several index entries, Writer hangs, and I have to kill it, and start over, because nothing was saved.

Now I have started again, but after a few deletions, I first save the document and start over.

It’s an impossible task.

@wdicks: if you feel brave and know how to use regular expressions, there may be a contorted solution.

  1. File>Save As as a .fodt document (Flat XML ODF Text Document)
  2. open the .fodt file with a text editor capable of PCRE regular expressions
  3. replace all <text:alphabetical-index-mark-.+?/> by nothing
    This regexp means locate all text starting with <text:alphabetical-mark- followed by anything “not greedily”(1) .+? ending at the first />. The important point is (1) otherwise common pattern .+ (without the question mark) will try to swallow as much text as possible, leading to matching the very last /> in the file. This would destroy most of your text.
  4. save the modified file
  5. open the patched .fodt with LO to check that nothing but the index entries has been erased

When you’re confident, save the .fodt as a standard .odt, eventually replacing the original one.

Once again: your text editor must be able to accept .+?.