View Single Post
Old 04-19-2010, 11:25 AM   #24
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 MSWallack View Post
Interesting. OK. So what do I add (and where do I add it) to note that the filename may or may not include a series? There won't be any brackets unless they are used to designate a series.
I think I already answered that:
Quote:
Post an example filename. The simplest is to add a parenthetical around your optional part and stick a "?" after it (no quotes).
That's the short answer. The longer answer is that this will often break something. A quick example is that suppose you sometimes don't separate author and title with space-hyphen-space. You can't just make it optional or it will be unable to find the split between author and title. In your case, use the brackets to find the series, then make it optional. Beware that you said you sometimes have brackets around the filetype after the title, which might screw things up.

There is no "magic" regex that fits everyone/everything.

BTW, brackets are special, so you need to "escape" them with a backslash. This is a bracket: "\["

This means match the letter "a" or "b": "[ab]

This means match an open bracket or the letter "a": "[\[a]

Last edited by Starson17; 04-19-2010 at 11:30 AM.
Starson17 is offline   Reply With Quote