# Can I replace last comma (,) with 'And'

**URL:** https://community.mp3tag.de/t/can-i-replace-last-comma-with-and/18527
**Category:** Export
**Created:** [December 17, 2016, 7:54pm UTC](https://community.mp3tag.de/t/can-i-replace-last-comma-with-and/18527 "2016-12-17T19:54:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vvikkass](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/d26b3c/32.png) [@vvikkass](https://community.mp3tag.de/u/vvikkass)
#### Post date: [December 17, 2016, 7:54pm UTC](https://community.mp3tag.de/t/can-i-replace-last-comma-with-and/18527/1 "2016-12-17T19:54:43Z")

</div>

Have audiobook files, it contains lots of narrators, I when export to text file it shows multiple narrator all separated by commas. Can i replace the last comma with 'And'?

something like...  
Author 1, Author 2, Author 3  
to  
Author 1, Author 2 And Author 3

and can i replace the only comma to 'And'  
something like this...  
Author 1, Author 2  
to  
Author 1 And Author 2

So some entry so that mp3tag replace the last comma to something and if thier is only one comma then it replace it with 'And'. I know simple trick of replacing wont do because then it will replace all commas with 'And'.

Please help.

Thanks for reading.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [December 18, 2016, 3:38pm UTC](https://community.mp3tag.de/t/can-i-replace-last-comma-with-and/18527/2 "2016-12-18T15:38:13Z")

</div>

> [@vvikkass](#):
>
> ... when export to text file it shows multiple narrator all separated by commas. ...

The export to text file, how do you do it?

> [@vvikkass](#):
>
> ... Can i replace the last comma with 'And'?  
> something like...  
> Author 1, Author 2, Author 3  
> to  
> Author 1, Author 2 And Author 3  
> and can i replace the only comma to 'And'  
> something like this...  
> Author 1, Author 2  
> to  
> Author 1 And Author 2  
> ...

There may be several ways to go, here is one using Regular Expression.

$regexp('Author 1, Author 2','^(.+),\s(.+)$','$1 and $2')  
==\> 'Author 1 and Author 2'

$regexp('Author 1, Author 2, Author 3','^(.+),\s(.+)$','$1 and $2')  
==\> 'Author 1, Author 2 and Author 3

DD.20161218.1738.CET
