View Single Post
Old 02-21-2009, 02:48 PM   #66
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,462
Karma: 27757440
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by ilovejedd View Post
Similar question. I have my books named:

Author - Series ## - Title
Code:
(?P<author>[^_]+) - (?P<series>.*?) (?P<series_index>[0-9]*?) - (?P<title>.+)
Author - Title
Code:
(?P<author>[^_]+) - (?P<title>.+)
How do I combine the two so they're just one regular expression?
Surround the series + number + - part in parentheses and follow it by {0,1}
kovidgoyal is offline