Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-22-2018, 05:22 AM   #1
Vortex
Groupie
Vortex began at the beginning.
 
Vortex's Avatar
 
Posts: 171
Karma: 10
Join Date: Dec 2008
Device: Likebook Mars
Question about regex and html comments

I have a lot of books that have the subtitle prepended to the book Comments. I've been trying to write a regex to extract them. They all start with a colon and end with a newline followed by a blank line.

I've tried all sorts of different ways, some work in the test view but not in reality, some work on some of the books but not others, most don't work at all. Is there some trick to doing this? Example:

Code:
: Subtitle info

Html comments start here...
Vortex is offline   Reply With Quote
Old 09-22-2018, 05:49 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Vortex - maybe you can make use of this plugin to strip out the HTML tags first ==>> Cleaning Comments

BR
BetterRed is offline   Reply With Quote
Reply

Tags
comments, html, regex, subtitle


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bug] HTML Comments in Preview Tex2002ans Sigil 4 08-22-2018 04:48 PM
Posible but at html comments Terisa de morgan Library Management 8 07-05-2016 07:22 AM
Using regex for substring of comments field rcross Library Management 2 03-15-2015 03:21 PM
Bulk Edit of comments using regex PeterT Library Management 2 07-25-2012 08:10 AM
Help to compose a regex to find strings, enclosed in comments tags Vadim777 Conversion 5 04-17-2012 12:49 PM


All times are GMT -4. The time now is 10:46 AM.


MobileRead.com is a privately owned, operated and funded community.