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.
|