Greetings...
I am trying to fill <series> and <series_index> automatically from filenames.
So i am trying to build a regular expression.
Files are allways named like that :
NAME First-Name - Title-of the book.mobi
or
[Name-of the serie-1.5]Title-of the book.mobi
Sometimes i can find a space after the "]".
Sometimes, 1.5 is written 1,5 and it would be perfect if the code can deal with that
For now, my code looks like that :
Code:
\[(?P<series>.+)\-(?P<series_index>[0-9]+((\.|,|)[0-9]?))?\](?P<title>.+)
It works perfectly for the case [serie-1]title.mobi, but not for author - tile.mobi case.
and if the number is "1,5", it is just ignored.
Can you help me, please ??
Thank you in advance