Regular Expression for conversion
0
0
Entering edit mode
3.2 years ago
shabbas12 ▴ 10

How we can convert citation "Faehling M, Schwenk B, Kramberg S, Eckert R, Volckmar AL, Stenzinger A. Oncogenic driver mutations, treatment, and EGFR-TKI resistance in a caucasian population with non-small cell lung cancer. Journal of Sciences. 2021; 41(4):898. https://10.20892/j.issn.2095-3941.2018.0055" to [1] Faehling et al. 2021. JS, 41(4):898. using regular expression?

Linux grep • 1.1k views
ADD COMMENT
0
Entering edit mode

Could you please give a little more information what you require this conversion for and how it is defined, specifically the Journal abbreviations? Note that "JS" is not very useful to find the journal again. It is better to use a specific reference management software to format references properly. Some allow for journal-specific templates.

ADD REPLY
0
Entering edit mode

Yes, We can use software like endnote or Mendely. But I want to do same conversion using Regular expression if possible, that grep exact required information.

ADD REPLY
1
Entering edit mode

Are all of your long-form references of exactly that format? If not this will be nigh-on impossible.

This is a (non-optimal) regex which captures the relevant groups, with the exception of the journal. I've yet to come up with a valid way of distinguishing this from the author list that would work for all journals, but maybe it gets you started. I still think this is a bad idea overall though.

First Author --------- Journal(?) -------------- Year -------------------Issue

(^.*\s[A-Z],).*(\b.*\b)\.\s([\d]{4});\s(\d*\(\d*\):\d*?\.)

ADD REPLY

Login before adding your answer.

Traffic: 2641 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6