Hello,
The default regular expression for getting metadata from filenames on import is:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
I have tried adjusting this, but I cannot get it right. Searches related to my problem do not yield the needed answer.
I am trying to import filenames of the following format and want them to fill in the obvious fields.
John Doe - [Narnia World 01] - The Book's Name.epub
The test with the default expression above just yields the author with the rest as the filename. My adjustments result in invalid expressions.
Can someone share the tweek to this so that files of this format will import as desired? Also, I'm hoping the adjustment will leave the following format as desired on import despite using a single regular expression.
John Doe - The Other Book's Name.epub
So using ONE regular expression for a group of files to be added:
The first book will import 4 types of metadata (author, series, series index, title).
The second book will import only 2 (author and title).
Help is definitely appreciated. I feel like what is default should work for this, but I get the symbols jumbled. I had a pretty good handle on regular expression awhile back, but I think I have to start over :-(
Attached is a screenshot of the Adding Books window showing the test with the default expression.
The default regular expression for getting metadata from filenames on import is:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
I have tried adjusting this, but I cannot get it right. Searches related to my problem do not yield the needed answer.
I am trying to import filenames of the following format and want them to fill in the obvious fields.
John Doe - [Narnia World 01] - The Book's Name.epub
The test with the default expression above just yields the author with the rest as the filename. My adjustments result in invalid expressions.
Can someone share the tweek to this so that files of this format will import as desired? Also, I'm hoping the adjustment will leave the following format as desired on import despite using a single regular expression.
John Doe - The Other Book's Name.epub
So using ONE regular expression for a group of files to be added:
The first book will import 4 types of metadata (author, series, series index, title).
The second book will import only 2 (author and title).
Help is definitely appreciated. I feel like what is default should work for this, but I get the symbols jumbled. I had a pretty good handle on regular expression awhile back, but I think I have to start over :-(
Attached is a screenshot of the Adding Books window showing the test with the default expression.