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, 02:31 AM   #1
PeterT
Taking a break; Fed up
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: 7,197
Karma: 45329895
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
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 online now   Reply With Quote
Old 07-25-2012, 02: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: 26,338
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need (?s) not (?m)
kovidgoyal is offline   Reply With Quote
Old 07-25-2012, 09:10 AM   #3
PeterT
Taking a break; Fed up
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: 7,197
Karma: 45329895
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Thanks That worked like a charm.
PeterT is online now   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 01:49 PM
Bulk edit of identifiers rmagere Library Management 4 02-19-2012 05:10 AM
Bulk Edit Comments column Jade Aislin Library Management 0 10-27-2011 04:18 AM
Bulk metada edit error trying to edit tags Purple Lady Calibre 8 02-17-2011 07:09 PM
Tips on Bulk Edit Metadata deschiff Calibre 5 10-15-2010 11:54 AM


All times are GMT -4. The time now is 08:58 PM.


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