View Single Post
Old 10-12-2012, 05:09 AM   #5
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 1,084
Karma: 1510540
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Aura HD
Quote:
Originally Posted by anvarit View Post
That worked great, if you have the time could you explain the expression ".* -"?
. : any character
* : repeat as many times as possible unitil the next literal in the regex
- : literal space and dash

This matches anything up to and including the dash in your author field (and because of the empty 'Replace with' removes it), leaving the number as the result to move into the series_index field.

More on Python regular expressions: http://docs.python.org/library/re.html
mbovenka is offline   Reply With Quote