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 04-09-2011, 10:48 PM   #1
cityzen
Member
cityzen began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jan 2011
Device: Kindle
Adding Books

Hi All
I am adding some books and the titles have all the details and have the same format. I have been playing with the regex stuff, but can seem to get more than a couple of the details at a time.

Titles look like this:
002 - Foundation Series - [The First Trilogy] - Second Foundation (by Isaac Asimov).epub

what is the regex to break this all apart to get the following results:
Title: Second Foundation
Authors: Isaac Asimov
Series: Foundation Series - The First Trilogy
Series Index: 002

Thanks in Advance
CZ
cityzen is offline   Reply With Quote
Old 04-10-2011, 02:17 AM   #2
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
What expressions did you try and what results did you get using them?
Manichean is offline   Reply With Quote
Old 04-11-2011, 11:28 AM   #3
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by cityzen View Post
Hi All
I am adding some books and the titles have all the details and have the same format. I have been playing with the regex stuff, but can seem to get more than a couple of the details at a time.

Titles look like this:
002 - Foundation Series - [The First Trilogy] - Second Foundation (by Isaac Asimov).epub

what is the regex to break this all apart to get the following results:
Title: Second Foundation
Authors: Isaac Asimov
Series: Foundation Series - The First Trilogy
Series Index: 002

Thanks in Advance
CZ
Without removing square brackets:
Code:
(?P<series_index>[0-9]+) -?\s*(?P<series>[^_0-9]*)\s*-\s*(?P<title>[^_].+) ?\(by (?P<author>[^_].+)\) ?
Starson17 is offline   Reply With Quote
Old 04-15-2011, 12:51 AM   #4
cityzen
Member
cityzen began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jan 2011
Device: Kindle
Thanks, had the update email set to weekly, so I didn't get an update till today.
@Manichean I didn't keep what I was doing, as it wasn't working. Suspect it was an absence of a \s* or two, as they don't look familiar.
@ Starson17 - thats pretty much it, i can tweak it from there.
cityzen 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
Saving after adding books KKneko7 Calibre 4 01-17-2011 09:55 PM
Adding properties to books IzzyMad Workshop 3 10-15-2010 11:05 AM
delete old books after adding iconeo Calibre 4 05-21-2010 01:03 AM
Help with adding books please stustaff Calibre 12 10-27-2009 02:30 PM
Problems adding books in 0.6.5 lalawe Calibre 8 08-11-2009 12:46 PM


All times are GMT -4. The time now is 12:34 AM.


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