Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-01-2009, 05:55 PM   #1
gandor62
Connoisseur
gandor62 began at the beginning.
 
gandor62's Avatar
 
Posts: 99
Karma: 14
Join Date: Jun 2008
Location: Brisbane Australia
Device: iPod Touch, Ipad, Kindle 2
Regex help needed

can any experts out there please help me with extracting series from a title

[Otherland 03]

I need to pull the series and series index and lose the [ ]

I can get the entire thing to series but cant work out how to seperate them

this is what I have to date

(?P<author>[^_-]+) -?\s*(?P<series>.+?)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?

Gratefully appreciate help
Cheers
Tony
gandor62 is offline   Reply With Quote
Old 11-02-2009, 07:43 AM   #2
grimborg
Enthusiast
grimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toysgrimborg shares his or her toys
 
Posts: 41
Karma: 5514
Join Date: Oct 2009
Location: Groningen, Netherlands
Device: PRS-T1
I don't quite understand the question. What result do you expect?
e.g.
[Otherland 03]
series=Otherland
index=03
?
grimborg is offline   Reply With Quote
Advert
Old 11-04-2009, 10:27 AM   #3
wygit
Enthusiast
wygit doesn't litterwygit doesn't litter
 
wygit's Avatar
 
Posts: 33
Karma: 112
Join Date: Jul 2009
Device: Sony PRS-505
this is what I'm using... it requires the space-hyphen-space between author, series(if there) and title, but it will filter out the brackets

(?P<author>[a-zA-Z'. ]+?) - \[?((?P<series>[a-zA-Z' ]+) (?P<series_index>[0-9\.]+)\]? - )?(?P<title>[^\.]+).*
wygit is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter detection when only digits - regex needed Perkin Calibre 15 09-20-2010 06:25 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 REPLACEMENT: Help needed! LARdT Sigil 12 01-04-2010 07:25 PM


All times are GMT -4. The time now is 01:39 PM.


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