Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2014, 11:26 AM   #16
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It doesn't matter, you just need to change the search expression to match both the comment and the stuff after it. If the stuff after it is of undefined form, like tags, use a start and end comment, like this:

<!-- tags --><!-- end -->

with search expression

<!-- tags -->(.*?)<!--end -->

and function

Code:
def __call__(self, m):
   return '<!-- tags -->' + tags + '<!-- end -->'

Last edited by kovidgoyal; 02-17-2014 at 11:37 AM.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Suggestion] Change indentation to one letter per indentation level. John Peterson Development 1 10-22-2012 02:05 PM
taking book sharing to the next level... paola General Discussions 35 09-30-2012 08:32 PM
Question: find and replace with variables? veezh Recipes 4 12-21-2010 05:23 AM
Regex capturing variables Lonas Sigil 9 08-14-2010 03:05 PM
Noob: just getting my head around all the variables KAM Sony Reader 16 02-04-2009 06:16 PM


All times are GMT -4. The time now is 06:59 AM.


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