Commit 8f6a2d4c authored by Maxime Chaillet's avatar Maxime Chaillet

change regexp which finds investigationId from doi. Now doi with name such as...

change regexp which finds investigationId from doi. Now doi with name such as suffix=TEST-ESRF-ES-invID are succesfully found.
parent b3f5df10
Pipeline #2225 failed with stages
This diff is collapsed.
......@@ -165,7 +165,7 @@ function extractFieldsFromCategories(data) {
//Add the corresponding fields in the data object
//@data: the data object, it is a reference
function extractFieldsFromDoi(data) {
//extract the investigationId given doi starts with 10.5072 or 10.15151
var regExp = RegExp(/^10\.(5072|15151)\/esrf-es-(\d+)/);
//extract the investigationId from the doi.
var regExp = RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);
data.investigationId = regExp.exec(data.DOI)[2];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment