View Single Post
Old 06-20-2011, 08:17 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,098
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by encapuchado View Post
Well, following Starsons advice in another thread [use regexp to get info from the file name], I'm close to get the authors listed by <last-name, first-name>.

I found that the default regexp, found in the "Preferences ->Adding Books" menu is almost what I need.

Code:
(?P<title>.+) - (?P<author>[^_]+)
Thus, for a file named "SuchandSuch - Azimov_Isaac.epub" I got title="SuchandSuch", author="Asimov Isaac".

However, I would like to get author="Asimov, Isaac". Now, AFAIK regexps are for pattern matching, not for string processing. So, my question is if there is a way to get that extra comma between the last name and the first name.
There is a tick box for that (swap Author Firstname with Lastname)
in the Adding books preference
theducks is offline   Reply With Quote