View Single Post
Old 08-09-2019, 03:13 AM   #1
Patrick Derwael
Enthusiast
Patrick Derwael began at the beginning.
 
Posts: 42
Karma: 10
Join Date: Oct 2018
Location: Belgium
Device: none
file name structure for import

Hi there,

I'm normalising my ebooks file names in order to reimport them in a clean new library and I'm tearing my hair off trying to guess the proper regular expression for import
Obviously, I went through the tutorial, but being no IT guy, this is somewhere in between Japanese and Chinese to me...
I also went through a number of articles found on Regular expression, but they are just frightening...

Concretely, all my ebooks have the following file name structure:
Author - Year - [Serie - Index] - Title.epub

Some examples:

A.E. Van Vogt - 1939 - [] - La faune de l'espace.epub
A.E. Van Vogt - 1943 - [Marchands d'armes - T01] - Les armureries d'Isher.epub
A.E. Van Vogt - 1946 - [] - A la poursuite des Slans.epub
A.E. Van Vogt - 1948 - [Le Non-A - T01] - Le monde des Non-A.epub
A.E. Van Vogt - 1951 - [Marchands d'armes - T02] - Les fabricants d'armes.epub
A.E. Van Vogt - 1952 - [] - Mission stellaire.epub
A.E. Van Vogt - 1956 - [Le Non-A - T02] - Les joueurs du Non-A.epub

I was hoping that the following would have done the job, but not quite...

(?P<author>) - (?P<published>) - [(?P<series>) - (?P<series_index>)] - (?P<title>).

If needed, I can rename my epubs to another file structure to accomodate the import

Could someone let me know which code/string I should use?

Thanks a bunch!
Patrick Derwael is offline   Reply With Quote