Quote:
Originally Posted by Starson17
Try this:
Code:
(?P<isbn>.*?)\.(?P<publisher>.*?\..*?)\.(?P<title>.*)\..*?\..*?
It parses this:
12345X.Publisher1.Publisher2.Title1.Title2.Title3. Ignore1.Ignore2.pdf
When requesting these, you really should give several examples of the actual file names, not just what you consider to be the pattern. It's important to see the spaces, hyphens, periods,, brackets, etc. in the names. For example, it's not clear if your actual files have the name Title, or {Title} in them. I assumed it didn't have the curly brackets, but if it did, other options would have been available.
|
Sorry, I gave a general example but I'll give a few actual examples as well:
0192840975.Oxford.University.Press.USA.Global.Warm ing.A.Very.Short.Introduction.Jan.2005.pdf
041528919X.Routledge.Roman.Berytus.Beirut.in.Late. Antiquity.Apr.2004.pdf
069100899X.Princeton.University.Press.Racism.A.Sho rt.History.May.2002.pdf
It seems to work almost perfectly thanks. The one slight annoyance is that the title and publisher has full stops in it (title: Racism.A.Short.History) but I can probably fix that with search and replace.
Thank you very much!