View Single Post
Old 02-21-2023, 09:32 AM   #14
isarl
Addict
isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.isarl ought to be getting tired of karma fortunes by now.
 
Posts: 293
Karma: 2534928
Join Date: Nov 2022
Location: Canada
Device: Kobo Aura 2
Quote:
Originally Posted by Phssthpok View Post
Cheap-and-nasty fix: make the comma-plus-name optional:
The only issue is that it's now taking everything up to the first comma as the last name, whereas before it was everything up to the last comma -- but there's only ever one (by design, when I tweak the author_sort values for "special" names), so it doesn't matter.

Leading and trailing spaces seem to be trimmed, so no further effort is needed.

Oh, and you're right about the trailing-space-only thing -- I must have fumbled it before.
You're still messing about with a regex that's way more complicated than you need. I have no interest in helping you debug a regex that I don't see as necessary, so unless you have more feedback about how my suggestion was insufficient for your needs, I will be bowing out from further help here.
isarl is online now   Reply With Quote