![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Nov 2011
Device: Galaxy S2
|
![]()
Objective
I have a .txt book from project Gutenberg, where an example chapter header would be - Code:
[2] THIEVES BREAK IN AND STEAL Code:
<h2>2. THIEVES BREAK IN AND STEAL</h2> When I try the regex search, it shows as Code:
<p>[2]</p> <h2>THIEVES BREAK IN AND STEAL</h2> Issue 2 When I use the following regex - Code:
(?m)<p>\[([\d]*?)\]</p>\s+<h2>.*?</h2> How can I get the conversion? Addendum The book on which I'm trying to operate is the text version here - http://www.gutenberg.org/ebooks/6984 |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Nov 2011
Device: Galaxy S2
|
![]()
After much trial & error, I found the following to work -
Search Code:
<p>\[(\d+)\]</p>\s+<p>(.+?)</p> Code:
<h2>\1. \2</h2> |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conversion and Regex Help | thedevilsjester | Calibre | 0 | 07-16-2010 06:10 PM |
Need help with a conversion regex - can't match newline | ereader123 | Calibre | 2 | 03-29-2010 10:58 AM |
Add book regex no longer works | magphil | Calibre | 3 | 03-24-2010 03:40 PM |
new to calibre/ conversion works mon-Sat, not Sunday? | gpsloco | Calibre | 2 | 12-13-2009 02:35 PM |
Multiple html (zip) conversion no longer works | Katelyn | Calibre | 4 | 08-07-2009 11:52 AM |