View Single Post
Old 08-03-2012, 07:48 AM   #1
TMSxMR
Member
TMSxMR began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2012
Device: Impression
Question Search/Replace from Title Field to Pubdate

Hi

I spent for now more than an hour trying to use search/replace function using regular expression to extract publishing dates from Title or Authors fields and push them into Publishing date field, I used the expression \d{4} to extract the publish year, the preview of the results is OK, but after applying it, it corrupts the library most of the times (and strangly sometimes works just as supposed) , when it corrupts, calibre thinks that there is unrecognized sting in the pubdate field, and some time recognize it just right (all years that I extracted are valid), is there a way to convert or force calibre to understand that the result of regular expression is a number not a string? or I should do that in some other way?
TMSxMR is offline   Reply With Quote