07-25-2012, 01:31 AM | #1 |
Grand Sorcerer
Posts: 12,217
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Bulk Edit of comments using regex
I'm trying to clean up the comments in my library to remove the "percentage read" values that I added once using the Kobo driver module.
Basically, it adds to each book that was on the Kobo the following comment at the end of the existing comment: Code:
<div class="user_annotations"> <span style="font-weight:normal"> <hr><b>Book Last Read:</b> 2012-03-04 00:14:27<br><b>Percentage Read:</b> 0%<hr></span> <br></div> Code:
Search Field: comments Search For: (?m)(.*?)<div class="user_annotations">.*?</div>(.*) Replace with: \1\2 Destination Field: #mycomment Mode: replace field What have I over looked here? |
07-25-2012, 01:50 AM | #2 |
creator of calibre
Posts: 43,930
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need (?s) not (?m)
|
Advert | |
|
07-25-2012, 08:10 AM | #3 |
Grand Sorcerer
Posts: 12,217
Karma: 74000000
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Thanks That worked like a charm.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help to compose a regex to find strings, enclosed in comments tags | Vadim777 | Conversion | 5 | 04-17-2012 12:49 PM |
Bulk edit of identifiers | rmagere | Library Management | 4 | 02-19-2012 04:10 AM |
Bulk Edit Comments column | Jade Aislin | Library Management | 0 | 10-27-2011 03:18 AM |
Bulk metada edit error trying to edit tags | Purple Lady | Calibre | 8 | 02-17-2011 06:09 PM |
Tips on Bulk Edit Metadata | deschiff | Calibre | 5 | 10-15-2010 10:54 AM |