View Single Post
Old 09-26-2014, 01:41 AM   #1
Keeth
Junior Member
Keeth began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Sep 2014
Device: iPad 3
Question Mass find and replace for chapter numbers

Hi,
I have an ebook that I am trying to tidy up. It was all one single text file and only had an asterisk to show where chapters ended. I managed to use find and replace to split the text into chapters and put each of those chapters into its own file. However, at the moment the chapter headings just read "Chapter". I would like to have the chapter numbers in the chapter headings but there are nearly 200 hundred chapters so I don't want to do it manually. Is there a way that I can get Sigil to automatically insert the chapter numbers? I was thinking there might be a way to do it with regex? Maybe something like:
Find: Chapter
Replace: Chapter ????
Where ???? inserts a number starting at one and increments every time it is inserted...

Any ideas?

(Sigil 0.7.4 on Mac 10.9.4)
Keeth is offline   Reply With Quote