View Single Post
Old 09-13-2010, 04:24 AM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,781
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by nitrogun View Post
OK, that allows the test to be read, but the result of pasting in
Anders, Ken J - Lethal Exposure.pdf
I don't know how to write these expressions, but I have one that someone else wrote that handles the above fine.

Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)
See attached for the tests with a series included.

Again, I didn't write this, but someone on this board did.
Attached Thumbnails
Click image for larger version

Name:	regex_test-1.jpg
Views:	281
Size:	42.7 KB
ID:	58127   Click image for larger version

Name:	regex_test-2.jpg
Views:	230
Size:	42.2 KB
ID:	58128  
DoctorOhh is offline   Reply With Quote