Hi All,
I am not very expert in regex, so please be patient. I am using an audio tagging software (MP3Tag) with scripting function in it.
Here is my problem. I have a string like this:
Doe, John Arthur~Munkova-Sanchez, Sophia~Koshi~Smith, Peter~Umba Tres, Kris
as you can see it contains names sepatated by a ~. The last name(s) and the first name(s) (if any) are separated by a comma. The space after the comma is not mandatory. Names can contain letters, apostrophs, periods, hyphens and spaces. The number of names can be one, or several.
I should create a string containing the names in natural sort, separated by a " / ", for example.
John Arthur Doe / Sophia Munkova-Sanchez / Koshi / Peter Smith / Kris Umba Tres
I tried this code:
$regexp($regexp(STRING~,(.+?)','\s*(.+?)~,$2 $1 / ), / $,)
but it doesn't work with the names without a comma (like Koshi in my example)
Any help will be appreciated.
Stevest