I am trying to parse the below string :
*A. BOSCOLO1,4, J. A. STARR2, N. LUNARDI4, C. ORI4, J. P. BENNETT, Jr3, V. JEVTOVIC-TODOROVIC2,3,4,
The output expected is below :
*A. BOSCOLO1,4
J. A. STARR2
N. LUNARDI4
C. ORI4
J. P. BENNETT, Jr3
V. JEVTOVIC-TODOROVIC2,3,4
I can not split them on the delimiter (,) as it’s inconsistent . The above are the names followed by one or more digits. Words followed by digit & commas until next word and No names are allowed which do not have any digits.
I have no idea how to write REGEX for the same . Any help would be highly appreciated.
Thanks
You can use a regular expression like this:;
Example:
Output: