Names with initials


#1

I'm currently using the regular expression here

^(.+)\s(.+)$
$2, $1

To edit the artist name so that it is transformed from Firstname Lastname to Lastname, Firstname for use in the artistsort field. This falls down however when you have artists such as K.D. Lang

Can anyone help?

Tim


#2

It turns K.D. Lang into Lang, K.D.
Do you want something else?


#3

I've just realised that. I just assumed it wouldn't work! Is there a primer somewhere that I should read - I'm interested in how the return values are worked out, precedence, that sort of thing. I only touched on grep years ago when I "brushed past" some unix boxes!

Tim


#4

There's
http://help.mp3tag.de/en/options_format.html#regexp
http://www.regular-expressions.info/tutorial.html
and you can find more on the net by yourself.


#5

Thanks