Regexp for author name: No switching and no comma, how?
Hi guys I'm trying to find a regexp for the following
author names - [series name 0x] - title. file ext
Any regexp I use switches the author names. Example:
Greg Cox - [Underworld 01] - Underworld (v1.6) (mobi).mobi
will be:
Author: Cox Greg
Series: [ Underworld
Series Index: 01
Title: Underworld (v1.6)
Questions:
1. How to NOT switch first and second name
2. How to remove [ from series
3. How to remove info in brackets (v1.6)
Expressions tried:
(?P<author>((?!\s-\s).)*)\s-(?:\s((?P<series>.+) (?P<series_index>\d+)((?!\s-\s).)*)\s-)?\s(?P<title>.*)
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
Variations for author taken from other expressions as:
(?P<author>[^_]+)
(?P<author>.+)
(?P<author>((?!\s-\s).)*)\s
and others....
Thank you
|