View Single Post
Old 04-15-2012, 08:49 AM   #4
JCSullivan
Chief Inspector Gamache
JCSullivan began at the beginning.
 
JCSullivan's Avatar
 
Posts: 123
Karma: 12
Join Date: May 2010
Location: Canada eh!
Device: Viewsonic
Quote:
Originally Posted by speakingtohe View Post
If you have a lot of books like that you could use search and replace with
\d\d-\d\d-
\d\d\d\d


Probably an expression on import would work but I am wimpy in that area.
Helen
Thanks Helen

Quote:
Originally Posted by Perkin View Post
As long as the filesname follow your example, here's a quick solution.
Code:
\d+-\d+-(?P<author>.+) - (?P<title>.+) \d+
If you want the date as published field you can alter it to
Code:
\d+-\d+-(?P<author>.+) - (?P<title>.+) (?P<published>\d+)
Thanks Perkin, I'm going to try this out later.

Your "d+" expression now explains better what the tutorial says about "\d is equivalent to [0-9]" and also helps me understand the expression better.
JCSullivan is offline   Reply With Quote