Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2012, 04:15 AM   #1
LMF
Member
LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.
 
Posts: 20
Karma: 3628
Join Date: Jan 2012
Device: iPad, Kindle
Regular Expression - Adding metadata from filename

Hi Guys,

I'm trying to set up the regular expression in adding books so that it reads some metadata from my filenames but I'm really lost with it. I've read through the manual and tutorial on using regular expressions and have tried all sorts of combinations with no luck. I'm an absolute beginner with this stuff.

My filenames are listed either as:

052184214X.Cambridge.University.Press.The.Idea.of. the.State.Mar.2005
or
0521012732.Cambridge.University.Press.The.Bigger.B ang.Jun.2002

All I really need to be able to pull out of the filenames is the isbn's and the titles - the publisher (Cambridge University Press) and the date added to the end aren't needed and from what I can tell from the "test" they can't be added anyway.

So yeah, if anyone has any advice or can write up an expression for me to try it would be greatly appreciated.

Thanks!
LMF is offline   Reply With Quote
Old 03-20-2012, 06:46 PM   #2
LMF
Member
LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.LMF can teach chickens to fly.
 
Posts: 20
Karma: 3628
Join Date: Jan 2012
Device: iPad, Kindle
Hi again,

Ignore the above - there's some errors in what I've written and I've found a way to get the isbn from the above examples. For anyone interested the expression is

(?P<isbn>.+?)\.(?P<title>.+)

Just note that this does not separate the whole filename out - it puts the isbn in isbn and everything after that in the title. I'm sure someone more skilled than me could sort out the publisher and published date but for what I need it for it does the job for me.

Happy calibre'ing!
LMF is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for expression to extract metadata from filename nickflyger Library Management 1 11-13-2011 10:39 AM
Adding Books, regular expression smarties86 Calibre 4 12-19-2010 08:18 AM
Regular Expression on adding books. Lokro Calibre 4 11-06-2010 11:05 AM
Regular Expression For Adding Books jhart711 Calibre 3 09-27-2010 06:51 AM
What is the default regular expression for filename import? palex481 Calibre 2 03-22-2009 06:11 PM


All times are GMT -4. The time now is 03:38 PM.


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