View Single Post
Old 06-20-2011, 08:11 PM   #1
encapuchado
Banned
encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.encapuchado ought to be getting tired of karma fortunes by now.
 
Posts: 130
Karma: 7587966
Join Date: Oct 2010
Location: Mexico
Device: Black Sony Touch (650)
Another help with regular expressions

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.
encapuchado is offline   Reply With Quote