![]() |
#1 |
Junior Member
![]() 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.. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
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+)\).*? 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>.*) Last edited by Manichean; 08-13-2011 at 11:05 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() 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:
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2011
Location: Russia, Saint-Petersburg
Device: none
|
I do not considerate, thank you very much!
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |