There is a user input string, which can have two different formats with some little variations:
Some AB, Author C, Names DEF,(2018) The title string. T journal name, 10, 560–564
Some AB, Author C, Names DEF (2018) The title string? T journal name 10:560-564
Some AB, Author C, Names DEF et al (2018) The title string? T journal name 10:560-564
Some AB, Author C, Names DEF. The title string. T journal name 2018; 10: 560-564
Some AB, Author C, Names DEF. The title string. T journal name 2018;10:560-564
What I need to get is:
- Author string part:
Some AB, Author C, Names DEForSome AB, Author C, Names DEF et al - Article title string:
The title stringorThe title string? - Journal name string:
T journal name - Year value:
2018 - Edition value:
10 - Page numbers
560-564
So I have to split the string by the delimiter . or (1234), ; and :.
I don't get a working regex for that and I don't know how to handle both formats, which have the year value at different position.
I started with something like:
string.split(/^\(\d+\)\s*/)
But how do I have to proceed as I'm getting an array for that.