Originally Posted by cityzen
I am adding some books and the titles have all the details and have the same format. I have been playing with the regex stuff, but can seem to get more than a couple of the details at a time.
Titles look like this:
002 - Foundation Series - [The First Trilogy] - Second Foundation (by Isaac Asimov).epub
what is the regex to break this all apart to get the following results:
Title: Second Foundation
Authors: Isaac Asimov
Series: Foundation Series - The First Trilogy
Series Index: 002
Thanks in Advance
Without removing square brackets:
(?P<series_index>[0-9]+) -?\s*(?P<series>[^_0-9]*)\s*-\s*(?P<title>[^_].+) ?\(by (?P<author>[^_].+)\) ?