diff --git a/src/app/search-box/search-box.component.ts b/src/app/search-box/search-box.component.ts index 372a52e3..bf2e3ea8 100644 --- a/src/app/search-box/search-box.component.ts +++ b/src/app/search-box/search-box.component.ts @@ -482,12 +482,15 @@ export class SearchBoxComponent implements OnInit { } observableFromToken(token: string): Observable> { + token = token.trim(); let observables = []; const geneSummaryObservable = of(this.summariesFromToken(token)); observables.push(geneSummaryObservable); token = token.replace(this.sysGeneIdRe, '').replace(this.sysTranscriptIdRe, '').trim(); - token = token.replace(/^PMID: +/, 'PMID:'); // handle copy and paste from PubMed pages + + // handle copy and paste from PubMed pages, and other weird things that happen to PMIDs + token = token.replace(/^(PMID|PubMed)[: _\-]*/i, 'PMID:'); if (token.length > 0) { // for now we filter out systematic IDs because they cause Lucene problems