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 08-12-2011, 04:14 PM   #1
eVrajka
Junior Member
eVrajka began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2011
Location: Russia, Saint-Petersburg
Device: none
Help me with regex please.

Help write a regular expression for a such filenames:

MMB vol.207 Welschof M., Krauss J. (eds.) Recombinant Antibodies for Cancer Therapy(Humana Press, 2002)(ISBN 0896039188)(456s)

MMB vol.018 Murphy D., Carter D.A. (ed.) Transgenesis Techniques.. Principles and Protocols (Humana Press, 1993)(ISBN 0896032450)(C)(T)(436s)

And how I can save original filename in custom column?

Thank you..
eVrajka is offline   Reply With Quote
Old 08-13-2011, 11:03 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
Which part of the file name do you think should go in what field? Something like
Code:
.*?\d+\s*(?P<author>.*?)\s*\(.*?\)\s*(?P<title>[^(]+)\s*\((?P<publisher>[^,]+),\s*(?P<published>[0-9]+)\)\(ISBN\s*(?P<isbn>\d+)\).*?
should at least pick up most of the information.

Edit: You can only save to those fields available in the add books settings dialog, but you could, for example, save the original filename to the title field using
Code:
(?P<title>.*)
However, you can only use one of the expressions at once, so you'll have to choose what to save.

Last edited by Manichean; 08-13-2011 at 11:05 AM.
Manichean is offline   Reply With Quote
Old 08-15-2011, 06:04 AM   #3
eVrajka
Junior Member
eVrajka began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2011
Location: Russia, Saint-Petersburg
Device: none
Thanks for you attention, but it's not work...

Maybe I'm doing something wrong.
Spoiler:


eVrajka is offline   Reply With Quote
Old 08-15-2011, 10:19 AM   #4
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 eVrajka View Post
Thanks for you attention, but it's not work...

Maybe I'm doing something wrong.
Spoiler:



The image resolution is too low to tell, but you have to put the format extension on the test filename. In other words, add .pdf to the test file name if it isn't there.

Last edited by Starson17; 08-15-2011 at 01:55 PM.
Starson17 is offline   Reply With Quote
Old 08-15-2011, 11:48 AM   #5
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 Starson said. The two test cases you gave in your original post worked for me.
Manichean is offline   Reply With Quote
Old 08-15-2011, 12:17 PM   #6
eVrajka
Junior Member
eVrajka began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2011
Location: Russia, Saint-Petersburg
Device: none
I do not considerate, thank you very much!
eVrajka 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
regex help please thevoiceofcheese Calibre 2 08-01-2011 11:27 PM
Regex Faster Sigil 2 04-24-2011 09:08 PM
What a regex is Worldwalker Calibre 20 05-10-2010 05:51 AM
Help with a regex A.T.E. Calibre 1 04-05-2010 07:50 AM
Regex help... Bobthebass Workshop 6 04-26-2009 03:54 PM


All times are GMT -4. The time now is 06:32 PM.


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