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 a887eb6300
commit 0f21c5caf6

View File

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