How to remove non hypertext from a list of bookmarks (automatically)?

After opening a html-file with bookmarks exported from a browser with LO it shows all in one column. Folder names as plain text. Bookmarks as Text with invisible hypertext (URL) with gray background.

If have 500 folder names and 11000 bookmarks. The folder names are inbetween the bookmarks. Now I want to have the folder names deleted.

plain text imidst bookmarks.ods

Pls can you share a minimal sample file with what you have?

What do you want to do, delete rows like row 3? (1305 Sozialdiakonie)

Yes, this is my goal.

I reworked the example to demonstrate how this can be done. See this attached file.

More specialised is this demo.

Hey Lupp. Your file works just fine. Great help. Thank you.