Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2012, 01:31 AM   #1
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,141
Karma: 73448616
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>
I thought my safest bet would be to add a new column while I test the reg-exp and tried the following:
Code:
Search Field: comments
Search For: (?m)(.*?)<div class="user_annotations">.*?</div>(.*)
Replace with: \1\2
Destination Field: #mycomment
Mode: replace field
Unfortunately, all that seems to happen is that #mycomment now contains a copy of the comments field.

What have I over looked here?
PeterT is offline   Reply With Quote
Old 07-25-2012, 01:50 AM   #2
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: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need (?s) not (?m)
kovidgoyal is online now   Reply With Quote
Advert
Old 07-25-2012, 08:10 AM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,141
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Thanks That worked like a charm.
PeterT is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 01:31 AM.


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