# Names with initials

**URL:** https://community.mp3tag.de/t/names-with-initials/3588
**Category:** Support
**Created:** [July 24, 2006, 12:39am UTC](https://community.mp3tag.de/t/names-with-initials/3588 "2006-07-24T00:39:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![timmorris](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@timmorris](https://community.mp3tag.de/u/timmorris)
#### Post date: [July 24, 2006, 12:39am UTC](https://community.mp3tag.de/t/names-with-initials/3588/1 "2006-07-24T00:39:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [July 24, 2006, 7:40am UTC](https://community.mp3tag.de/t/names-with-initials/3588/2 "2006-07-24T07:40:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![timmorris](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@timmorris](https://community.mp3tag.de/u/timmorris)
#### Post date: [July 24, 2006, 7:44am UTC](https://community.mp3tag.de/t/names-with-initials/3588/3 "2006-07-24T07:44:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [July 24, 2006, 8:38am UTC](https://community.mp3tag.de/t/names-with-initials/3588/4 "2006-07-24T08:38:49Z")

</div>

There's  
[https://docs.mp3tag.de/actions/replace-regexp](https://docs.mp3tag.de/actions/replace-regexp)  
[http://www.regular-expressions.info/tutorial.html](http://www.regular-expressions.info/tutorial.html)  
and you can find more on the net by yourself.

---

<div class="post-metadata">

### Author: ![timmorris](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e9a140/32.png) [@timmorris](https://community.mp3tag.de/u/timmorris)
#### Post date: [July 24, 2006, 8:42am UTC](https://community.mp3tag.de/t/names-with-initials/3588/5 "2006-07-24T08:42:10Z")

</div>

Thanks

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:19pm UTC](https://community.mp3tag.de/t/names-with-initials/3588/6 "2026-02-09T12:19:50Z")

</div>


