Quote:
Originally Posted by Lokro
Looking for some help to prevent the whitespace before the Author's First name.
|
Your problem has nothing to do with the "crazy" regex (and I object to that characterization - I'd prefer "comprehensive" <grin>)
Regex can only pull the entire author name, not the first or last name parts separately. There's no change you can make to the regex that will do what you want. However, after the whole string is pulled,
then Calibre can swap the LN, FN format to FN LN, and it does that when you tell it to by setting the swap option in Preferences. The "whitespace" you are worried about arises during that swap, and it's not real - you see it only in the "test." Calibre strips the leading whitespace before it uses the name.
(I'll test and verify that in a moment - I'm in the middle of an install and can't run Calibre until after I reboot, but don't want to lose this typing.)
Edit: Yes, it stripped the leading whitespace.