View Single Post
Old 08-29-2011, 04:57 PM   #11
hanbalfrek
Junior Member
hanbalfrek began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2011
Device: Nook Color
Quote:
Originally Posted by user_none View Post
The test input requires a file extension. E.G. "Test Title - Test Author.epub"
Thanks for that! Exactly what the problem was.



Quote:
Originally Posted by dwanthny View Post

I don't understand them fully, but I can rearrange ones that work.

Try

Code:
^((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<author>[^\-_0-9]+)\s*-\s*)?(?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)

Thanks again! That worked!
I was able to edit the end so that the series was not necessary, but I still gotta study regex more to understand why I'm having such problems with the first two fields on my own.

Edited one is:
Code:
^((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<author>[^\-_0-9]+))?(\s*-\s*(?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)?)?
Thanks again everyone!
hanbalfrek is offline   Reply With Quote