From 5e4c464cf515707fa7ebab0197dac57f874847f0 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 4 Apr 2013 22:23:56 -0400 Subject: [PATCH] Fix lookup of <8 digit PMIDs --- chrome/content/zotero/lookup.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js index 2ef6d9e6f3..b7f10084c1 100644 --- a/chrome/content/zotero/lookup.js +++ b/chrome/content/zotero/lookup.js @@ -76,9 +76,9 @@ const Zotero_Lookup = new function () { //finally try for PMID if(!items.length) { - // PMID; right now, PMIDs are 8 digits, so it doesn't seem like we will need to - // discriminate for a fairly long time - var PMID_RE = /(?:\D|^)(\d{8})(?!\d)/g; + // PMID; right now, the longest PMIDs are 8 digits, so it doesn't + // seem like we will need to discriminate for a fairly long time + var PMID_RE = /(?:\D|^)(\d{1,9})(?!\d)/g; var pmid; while((pmid = PMID_RE.exec(identifier)) && foundIDs.indexOf(pmid) == -1) { items.push({itemType:"journalArticle", contextObject:"rft_id=info:pmid/"+pmid[1]});