Thread: Regex examples
View Single Post
Old 07-25-2020, 09:27 AM   #655
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,698
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Unfortunately, I don't think what you want is possible. Not with Sigil's built-in regex Search & Replace feature anyway. Search and Replace doesn't know what the filename is. In this instance, it's merely searching the content given to it. Which is the contents of the file. The regex engine is unaware that what it's searching for (and replacing) is even part of a file. It's immaterial.

You (or someone) may be able to construct a sigil plugin that could accomplish this, but unless it's something you foresee happening a lot, developing a plugin to handle it would likely be more involved than just manually updating the chapter headers.

Sorry.
DiapDealer is offline   Reply With Quote