Is there an regexp I can use to detect from the input:
Nikolai, Gogol, Johann Wolfgang von Goethe und Fritze Hanschmann
the expected output:
Nikolai, Gogol
Johann Wolfgang von Goethe
Fritze Hanschmann
The goal is to elimnate the word "und" and that I get an array of the names.
Edit: The first two words with the comma always belongs together.
Edit2: This is my current approach:
/((\w+),(\s)(\w)+\,\s)(.*)/g
How can I detect and replace the remaining groups and also the word "und" ?