Regex fix for endyear

As of biblatex 3.5, years and endyears can be negative (BCE).
This commit is contained in:
Juergen Spitzmueller 2016-09-18 12:59:43 +02:00
parent 2c4673af58
commit 1c725c913c

View File

@ -326,7 +326,7 @@ docstring const BibTeXInfo::getYear() const
// Format is [-]YYYY-MM-DD*/[-]YYYY-MM-DD*
// We only want the years.
static regex const yreg("[-]?([\\d]{4}).*");
static regex const ereg(".*/([\\d]{4}).*");
static regex const ereg(".*/[-]?([\\d]{4}).*");
smatch sm;
string const date = to_utf8(year);
regex_match(date, sm, yreg);