Commit 6bb4239e authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue30' into 'master'

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

See merge request !27
parents d27afe87 8f6a2d4c
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