View Single Post
Old 09-25-2014, 03:26 PM   #4
JustForFun
Enthusiast
JustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-booksJustForFun has learned how to read e-books
 
Posts: 30
Karma: 752
Join Date: Nov 2010
Device: PB360
Does (?P<author>.+?)\. (?P<title>.+) work for you? It considers all characters before the first dot followed by a space as author and the rest as title.

Regexes are greedy by default which means that (?P<author>[^_]+)\. matches all characters (which are not '_') before the last dot followed by a space as author. See the note under Hey, neat! This is starting to make sense! in the tutorial on regexes.
JustForFun is offline   Reply With Quote