View Single Post
Old 11-06-2010, 10:01 AM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Lokro View Post
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.

Last edited by Starson17; 11-06-2010 at 10:24 AM.
Starson17 is offline   Reply With Quote