Quote:
Originally Posted by JustForFun
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.
...
|
Thanks for your help people.
(?P<author>.+?)\. (?P<title>.+) does the trick nicely.
And having read "Hey neat ... " for the fifth time has me thinking that I could have made the + in the first phrase of (?P<author>[^_]+)\. (?P<title>.+) non-greedy by adding a ? just so (?P<author>[^_]+?)\. (?P<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."
I had tried many combinations and permutations but all in the second phrase of the expression as I ASSumed that the first phrase stopped matching at the first "\. "
My grasp of regular expressions doesn't let me create and use them in Bulk File Rename yet.