Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2010, 03:31 PM   #1
Partzz
Junior Member
Partzz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2010
Device: Blackberry
Help!! Having trouble with regular expression

Here is the file name.

Robert Doherty - Area 51 01 - Area 51.lit

My Problem is some of my series have numbers in the name, and I would like to be able to import with the numbers. For awhile, I lost my expression, and Calibre would not import past the number in the title either. I was able to repair that. Here is what I get with the example file now...

Example:

Title=Area 51 01 - Area 51
Author=Robert Doherty
Series Name=
Series Index=

What I would like to find out is if there is an expression that would seperate the numbers in the series and the series number.

My Current expression is below....
Quote:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?([\(\[]?(?P<series>[^0-9\-]+) (- )?(?P<series_index>[0-9.]+)[\)\]]?\s*-\s*)?(?P<title>.+)

Last edited by Partzz; 09-13-2010 at 03:33 PM. Reason: Oops! Mis typed some stuff!
Partzz is offline   Reply With Quote
Old 09-13-2010, 04:05 PM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Try
Quote:
(?P<author>.+) - (?P<series>(.+)) (?P<series_index>(.+?)) - (?P<title>.+)
works in the test box.
Perkin is offline   Reply With Quote
Advert
Old 09-14-2010, 12:32 PM   #3
Partzz
Junior Member
Partzz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2010
Device: Blackberry
Thanks!

Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, Thank-you, and Thank-You!!!

I appreciate this. I'm just not getting the hang of the expression language yet!
Partzz is offline   Reply With Quote
Reply


Forum Jump

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
Regular Expression Help Needed dloyer4 Calibre 1 07-25-2010 10:37 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


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


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