# Regular Expressions

**URL:** https://community.mp3tag.de/t/regular-expressions/521
**Category:** Howto
**Created:** [October 16, 2003, 4:47pm UTC](https://community.mp3tag.de/t/regular-expressions/521 "2003-10-16T16:47:29Z")
**Posts on this page:** 1
**Showing post:** 47

<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: [August 24, 2011, 12:55pm UTC](https://community.mp3tag.de/t/regular-expressions/521/47 "2011-08-24T12:55:45Z")

</div>

**How to copy a list of artists and their roles ...  
... from tag-field COMMENT  
... to tag-field INVOLVEDPEOPLE**

**_Example 1_**  
From: **COMMENT**  
**Person1:Role1  
Person2:Role2  
Person3:Role3**  
To: **INVOLVEDPEOPLE**  
**Role1:Person1;Role2:Person2;Role3:Person3;**

Action: **Format value**  
Field: **INVOLVEDPEOPLE**  
Formatstring:

**$regexp(%COMMENT%$char(13),'(.+?):(.+?)[\r\n]+','$2:$1;')**

**_Example 2_**  
From: **COMMENT**  
**Person1:Role1  
Person2: Role2a,Role2b  
Person3 : Role3a, Role3b  
Person4: Role4a & Role4b, Role4c**  
To: **INVOLVEDPEOPLE**  
**Role1:Person1;Role2a,Role2b:Person2;Role3a,Role3b:Person3;Role4a & Role4b,Role4c:Person4;**

Action: **Format value**  
Field: **INVOLVEDPEOPLE**  
Formatstring:

**$regexp($regexp(%COMMENT%$char(13),'(.+?)\s\*:\s\*(.+?)[\r\n]+','$2:$1;'),'\s\*,\s\*',',')**

DD.20110824.1757.CEST

---

_[View the full topic](https://community.mp3tag.de/t/regular-expressions/521)._
