# Replacing Composer birth/death-dates

**URL:** <https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439>\
**Category:** Support\
**Created:** [January 2, 2021, 1:56pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439 "2021-01-02T13:56:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bbrip](https://community.mp3tag.de/u/bbrip)\
**Post date:** [January 2, 2021, 1:56pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439/1 "2021-01-02T13:56:08Z")

</div>

I am pretty new to regexp and trying to figure out how turn something like:

Brahms, Johannes (1833-1897)  
Into:  
Johannes Brahms

Turninga round first/last names I found something, but I struggle to get rid of those bracketed dates.

I'd appreciate a bit of help.

Many thanks

---

<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:** [January 2, 2021, 4:33pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439/2 "2021-01-02T16:33:50Z")

</div>

you could try:  
`$regexp('Brahms, Johannes (1833-1897)','(.*), (.*) \(\d+.*',$2 $1)`  
Or for an action of the type "Replace with regular expression":  
Search string: `(.*), (.*) \(\d+.*`  
Replace string: `$2 $1`

---

<div class="post-metadata">

**Author:** ![bbrip](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bbrip](https://community.mp3tag.de/u/bbrip)\
**Post date:** [January 2, 2021, 4:56pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439/3 "2021-01-02T16:56:46Z")

</div>

That worked many thanks.

Just for me to understand: Is the Backslash ("\") used to get rid of characters. The first two bits (turning around last and firstname) I had figured out, but did not know how to remove the "third" bit (Dates).

---

<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:** [January 2, 2021, 5:02pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439/4 "2021-01-02T17:02:39Z")

</div>

the Backslash turns the following character into literals, "escapes" them.  
You see that the first brackets were used to address the string parts to be turned around. Then the string contains an opening bracket plus a number plus further characters. But the opening bracket is to be taken as that what it is: a bracket and not as part of the expression syntax.  
See further information in the help:

> **[Replace with Regular Expression – Mp3tag Documentation](https://docs.mp3tag.de/actions/replace-regexp/)**
>
> Documentation on the Replace with Regular Expression action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

---

<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 1, 2021, 5:02pm UTC](https://community.mp3tag.de/t/replacing-composer-birth-death-dates/51439/5 "2021-02-01T17:02:42Z")

</div>

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