Entering edit mode
3.1 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?
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.
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.
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*?\.)