View Single Post
Old 04-06-2010, 02:22 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 Spiffy View Post
Your standard naming includes no brackets, right?
I started to respond to this twice, but I'm not at home and can't test anything I post. It's pretty easy to make the brackets optional if everything else is right.
this is an optional open bracket:

\[?

and this is an optional closed bracket:

\]?

Try this (totally untested):

Code:
wrong code posted (untested)
no, try this (tested):
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>.+)

Last edited by Starson17; 04-06-2010 at 07:24 PM.
Starson17 is offline   Reply With Quote