View Single Post
Old 06-15-2013, 01:20 PM   #1
macnab69
Zealot
macnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toysmacnab69 shares his or her toys
 
Posts: 129
Karma: 5754
Join Date: Jan 2012
Location: South Africa
Device: Kindle 4
Help: regex for add books

If I use this format for filename:
author - [series] [series_index] title
I can use this regex:
(?P<author>.+) - \[(?P<series>.+)\] \[(?P<series_index>.+)\] (?P<title>[^_]+)

I would prefer:
author - [series series_index] title

but I don't know how to stop
(?P<series>.+)
when it gets to numbers, and then include the numbers in series_index

EDIT: Never mind. What if the series name is Oceans 11? Will have to stick to current format.

What I need is the equivalent to
{authors} - [{series} {series_index}] {title}
which is used in Save to disk.

Last edited by macnab69; 06-15-2013 at 01:35 PM. Reason: Founf answer
macnab69 is offline   Reply With Quote