![]() |
#16 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |