View Single Post
Old 12-28-2011, 06:53 AM   #19
Perkin
Fanatic
Perkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane AustenPerkin has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Perkin's Avatar
 
Posts: 557
Karma: 23783
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300
Quote:
Originally Posted by dwanthny View Post
May someone can write an expression that breaks on the second space from the end. This way most authors would split correctly because they are two word names.
This should work for this use.

Set the regex to
Code:
(?P<title>.+) (?P<author>.+ .+)
Hope that works for you.

Edit: This will only work for authors with two names, not ones with three, such as Dr. or Jnr. etc.

Last edited by Perkin; 12-28-2011 at 06:55 AM.
Perkin is offline   Reply With Quote