One final note: I had some series with both a space before the number as well as no space:
[My Little Pony 02]
[My Little Pony03]
So I used conditional Regex like this to handle both cases.
Group 6 gives the extracted series name
Group 7 gives the extracted series_index
(\[(.+)?(\s\d{2}))(?(3)\[(.+)?(\d{2}))\]|\[(.+)?(\d{2})\]
This strikes me as being too verbose, but it seems to work.
|