Thread
:
Help needed- RegExp for filename to metadata when adding books
View Single Post
06-05-2016, 03:11 PM
#
2
eschwartz
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
How does this look?
The series/series_index section (with brackets properly accounted for) is surrounded in an optional non-capturing group.
Code:
(?P<author>[^_-]+) - (?:\[(?P<series>[^_0-9-]*) (?P<series_index>[0-9]*)\] - )?(?P<title>[^_].+)
eschwartz
View Public Profile
Find More Posts by eschwartz
Track Posts by eschwartz via RSS