12-23-2014, 11:12 PM | #1 |
New old guy
Posts: 69
Karma: 10
Join Date: Feb 2012
Device: kindle fire
|
Regex: incrimenting/decrimenting
Is there a way to increment/decriment a value before replacing it?
I have a book structured with 90 chapters, each chapter a separate file; however, the chapter numbers are 38-90 (probably from using EpubSplit to break up a 'complete set'. I would like to renumber the Chapters to be 1-90. The chapter headings are easy to find: <h2 class="calibre1">Chapter ([0-9]+)</h2> For replacement is there something akin to <h2 class="calibre1">Chapter \1-37</h2> |
12-23-2014, 11:28 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The calibre editor can do this, with a regex function.
http://manual.calibre-ebook.com/function_mode.html |
12-24-2014, 12:02 AM | #3 | |
New old guy
Posts: 69
Karma: 10
Join Date: Feb 2012
Device: kindle fire
|
Regex: incrimenting/decrimenting
Quote:
Didn't know that the calibre editor had a Regex-Function mode and didn't know there was such a detailed manual for using it. Should have known that calibre had it covered. It always does. |
|
12-24-2014, 12:09 AM | #4 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It is a relatively new feature.
Although anyone keeping a close eye on certain discussions would have seen Kovid's post indicating that this was going to happen, going back quite some time. Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex help please | bremler | Workshop | 10 | 04-24-2014 09:46 PM |
Help with some regex | Chaos_Therum | Library Management | 1 | 12-28-2013 11:20 AM |
Regex help | paulfiera | Sigil | 4 | 06-14-2012 07:55 AM |
Regex | Gunnerp245 | Conversion | 5 | 03-05-2012 04:15 PM |
Help me with regex please. | eVrajka | Library Management | 5 | 08-15-2011 12:17 PM |