![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2011
Device: Adroid 1.6 MID
|
Regular expression - Example needed
Hi all,
I'm looking into Calibre to sort out my large e-book collection and it's looking good so far, actually I love it. Browsing trough, I saw many possiblities and one of them is those regular expressions. Now to my question: Can conversion be used to insert and control first 5 lines of txt file conversion output so the txt output will have those first 5 set as anything I please? This I need for bulk conversion. From what I understand, it can be done but I could use an example directly relating to what I'm after as a point of reference before I go to any more complexed undertakings ![]() Thanks for (anyone's) answer! Last edited by americhanac; 02-08-2011 at 03:38 AM. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Sure, with search and replace you can do this. Note at the time it hits Search and replace you need to write html.
Should be something like this search: Code:
(?P<bdy><body[^>]*>) Code:
\g<bdy>\n<p>line1</p>\n<p>line2</p>\n<p>line3</p>\n<p>line4</p>\n<p>line5</p>\n |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regular Expression Help | Azhad | Calibre | 86 | 09-27-2011 02:37 PM |
Regular Expression Help | iKarampa | Calibre | 13 | 12-15-2010 07:17 AM |
Regular Expression Help | smartmart | Calibre | 5 | 10-17-2010 05:19 AM |
Regular Expression Help Needed | dloyer4 | Calibre | 1 | 07-25-2010 10:37 PM |
Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 10:45 PM |