View Single Post
Old 12-04-2023, 02:21 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,464
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
My personal preference is to add a title="blah de blah" to one of the header tags and then limit the ToC generation to that tag.

That is for the original example:
Code:
<h1>Title</h1>
<h3>Author</h3>
Search would be for:
Code:
<h1>(.*?)<h1>
<h3>(.*?)</h3>
the output would be:
Code:
<h1 title="\1 - \2">\1<h1>
<h3>\2</h3>
and I would restrict the ToC entries to h1.
DNSB is online now   Reply With Quote