# RegEx - How to Replace Two Occurrences of Commas

**URL:** <https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714>\
**Category:** Support\
**Created:** [June 23, 2022, 1:31am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714 "2022-06-23T01:31:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dadarkman808](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dadarkman808/32/11599_2.png) [@dadarkman808](https://community.mp3tag.de/u/dadarkman808)\
**Post date:** [June 23, 2022, 1:31am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714/1 "2022-06-23T01:31:30Z")

</div>

Hi community!

I have a series of MP3 tags that have separating commas as naming conventions.  
So, as an example: **DJ One, MC Two, Rapper Three**.  
How can I change it through RegEx to be **DJ One ft. MC Two & Rapper Three** where the two commas are replaced by "ft." and "&"?

Thanks for the huge help to everyone here!

---

<div class="post-metadata">

**Author:** ![dadarkman808](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dadarkman808/32/11599_2.png) [@dadarkman808](https://community.mp3tag.de/u/dadarkman808)\
**Post date:** [June 23, 2022, 4:58am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714/2 "2022-06-23T04:58:26Z")

</div>

OK, I kept looking online for an answer to my situation. I bumped into a line of RegEx code for "first occurrence on Stack Overflow". I replaced whatever character it had to a comma. It looks like this now: **^([^,]\*),**. However, I couldn't find a way to replace both occurrences at once (at least not yet). So, something tells me to combine that with a Replace Action. Well, it worked 🙃

![Mp3tag_zMpcmbsIsS](https://community.mp3tag.de/uploads/default/original/2X/2/21c565e5274ce5e27e30fcb8066166339d43b357.png)

As you can see here:

 ![Fv2vjQPX7F](https://community.mp3tag.de/uploads/default/original/2X/1/11643413ee99fb5b16367fe567c2c3c71f8c58f9.png)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [June 23, 2022, 5:01am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714/3 "2022-06-23T05:01:03Z")

</div>

You could try "Replace with regular expression"  
Search string: `(.*), (.*), (.*)`  
Replace string: `$1 & $2 ft. $3`

---

<div class="post-metadata">

**Author:** ![dadarkman808](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dadarkman808/32/11599_2.png) [@dadarkman808](https://community.mp3tag.de/u/dadarkman808)\
**Post date:** [June 23, 2022, 5:08am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714/4 "2022-06-23T05:08:32Z")

</div>

Man, thanks a bunch! 🙏🏾 Your suggestion actually works 100%

---

<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:** [July 23, 2022, 5:08am UTC](https://community.mp3tag.de/t/regex-how-to-replace-two-occurrences-of-commas/57714/5 "2022-07-23T05:08:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
