|
|
#1 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Scientific American - 1993.12 - Taming Africanized Killer Bees Scientific American Online - 2006 #28 - Evolution What is the correct regular expression to read all these? |
|
|
|
|
|
#2 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,127
Karma: 77366
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
There's an introduction in the user manual.
__________________
I reject your reality and substitute my own. |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Thank you,
I sincerely can not follow these, this is well above my understanding
|
|
|
|
|
|
#4 |
|
Member
![]() Posts: 21
Karma: 87
Join Date: Jan 2008
Device: Nook, EBW-1150
|
"~^Scientific American"
Include the quotes, will get you everything that starts with the words Scientific American |
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,994
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I think he's looking for a regex to import them with at least title. There is no "correct" or "best" answer. He'd need to specify what metadata (author, pubdate, publisher, series name, series_index) he's trying to extract from the title to answer his question.
|
|
|
|
|
|
#6 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Thanks,
How would I use it to extract the info? Scientific American - 1993.12 - Taming Africanized Killer Bees Name=Scientific American pubdate=1993.12 Title=Taming Africanized Killer Bees For the other style: Scientific American Online - 2006 #28 - Evolution Name=Scientific American Online not sure how I would store the 2006 #28 , maybe skip Title=Taming Africanized Killer Bees |
|
|
|
|
|
#7 |
|
Rob Wheeler (Kent, UK)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13
Karma: 50000
Join Date: Oct 2010
Location: Kent, UK
Device: Sony PRS-650
|
You could try...
^Scientific American.*?$ But not entirely sure from the question what you want to achieve. Could you give the original text and then the text you wamt to extract from it. |
|
|
|
|
|
#8 |
|
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 504
Karma: 1177386
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano
|
You can't.
You can only extract Title, Authors, Series, Series index and ISBN using a regular expression as you add the book. Take a look at preferences for adding books. But if you are in luck, the files you have may have all the correct metadata embeded in them. Then you can have Calibre read it directly from inside the file. Also something you specify in preferences for adding books. |
|
|
|
|
|
#9 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Do you know the regular expression that would at least give me the title?
|
|
|
|
|
|
#10 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 557
Karma: 23783
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300
|
Using the Scientific American as series a simple one would be
Code:
(?P<series>.*) - .* - (?P<title>.*) |
|
|
|
|
|
#11 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Thank you for the reply.
I tried it with "Scientific American - 1993.12 - Taming Africanized Killer Bees" as test. It recognises "Scientific American - 1993" as title and for the series it gets no match. |
|
|
|
|
|
#12 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,127
Karma: 77366
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Try
Code:
(?P<series>.*?) - .*? - (?P<title>.*?)
__________________
I reject your reality and substitute my own. |
|
|
|
|
|
#13 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,879
Karma: 285970
Join Date: Jan 2010
Location: France
Device: Sony PRS-300, HTC WM6.5, Samsung Galaxy Nexus, HTC Sensation
|
Quote:
You probably didn't perform the secret handshake. For the tests to work, you must have a file extension on your file name.
__________________
Support calibre developers at no cost to you by using calibre's get books feature. Use Calibre Companion to wirelessly connect your Android phone or tablet to calibre charles.haleys.org/calibre |
|
|
|
|
|
|
#14 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Yes it works!
I did not know about the handshake! Last edited by iKarampa; 12-15-2010 at 07:20 AM. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regular Expression Help | Azhad | Calibre | 86 | 09-27-2011 02:37 PM |
| Regular Expression Help | smartmart | Calibre | 5 | 10-17-2010 05:19 AM |
| Need Help Creating a Regular Expression | Worm | Calibre | 9 | 08-18-2010 01:20 PM |
| Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 10:45 PM |
| I don't know how to use wilcards and regular expression.... | superanima | Sigil | 4 | 02-21-2010 09:42 AM |