In a html output from a database I have thousands of names, that I want to list in an Alphabetical Index. The names are marked <> (or some other marking, e.g. --name–) And should be marked as an Indexitem with Main item check.
The Search and Replace box doesn’t seem to provide such an option. Can it be done in a macro? How?
Please provide more details about your workflow.
You say you have an HTML output. How do you create it? From a standalone application? With Base?
If with Base, replace it with an .odt output. This will be more easily taken by Writer without the approximate translation HTML → ODF.
My idea would be to extract all your names into a plain text file, one name per line, with some macro generator utility. This text file is then used by Writer as a concordance file (maybe after some cleaning step) so that you need not mark your text. You only need to insert the alphabetical index where appropriate and select your concordance file.
PS1: if your output is really HTML, I’d choose another bracket pair than <>
to avoid confusion/ambiguity with HTML elements.
PS2: as usual, answers are more accurate if you mention OS name, LO version and save format.