View Single Post
Old 06-03-2010, 07:38 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by mike_bike_kite View Post
Most file names are like this:
Arthur C Clarke - Patent Pending.txt
But a small percentage might be like this:
Arthur C Clarke - Rama 01 - Rendezvous With Rama.lit
I found the regular expression it currently has (?P<title>.+) - (?P<author>[^_]+) but I couldn't see how you could suggest multiple expressions ie one expression for the first type of file name and another for the other type of file name.
Use this for your regex:
Code:
^((?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>.+)
It handles both your examples and many more.

Quote:
I'm familiar with traditional regexp but these are different - I assume the <title> refers to an internal variable for the title but the ?P etc seemed odd.
That's part of the Python format string

Quote:
That worked though it's not very integrative. It's a shame they don't have a simple display column for cover and then you could just sort by this field to find those without covers.
I prefer having the cover:false option. It can be combined with other searches to e.g. show me all books that don't have a cover or don't have a summary. (Have you found the cover browser?)

Quote:
PS I'm using the save option to save things but I have no real idea what I'm saving - is it the new meta data I'm creating?
Metadata is saved automatically. Are you referring to Save to Disk? That's used to save your book to the disk. I'm not sure what other "save" you may be referring to.
Starson17 is offline   Reply With Quote