View Single Post
Old 10-02-2014, 03:01 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,108
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by mrmikel View Post
I use h3 for headers for chapters. I would like to be able to make an id using regex.

I would like to take the next 5-7 characters out of the heading following <h3> and make it <h3 id="next5characters">. I suppose I could rename all the chapters so I could make an HTML TOC more easily, but this seems less work, if it can be made to work.

Thanks.
Code fragment:

Code:
(\S){2,5}
I chose the range: 2 thru 5 of not whitespace

You would need to do the rest
theducks is online now   Reply With Quote