# Replace

**URL:** https://community.mp3tag.de/t/replace/5009
**Category:** Support
**Created:** [June 14, 2007, 12:52pm UTC](https://community.mp3tag.de/t/replace/5009 "2007-06-14T12:52:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![percepto](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@percepto](https://community.mp3tag.de/u/percepto)
#### Post date: [June 14, 2007, 12:52pm UTC](https://community.mp3tag.de/t/replace/5009/1 "2007-06-14T12:52:45Z")

</div>

I have searched on the forum but can't find the answer, apologies if it is just that I am blind!  
Ok, I have files with the length in the title such as :  
"La Notte Etterna [5:43]"  
"Just You & I [5:36]"

Specifically I want to know how to replace everything between the "[" and "]" using a wildcard. Also to replace the "[" and "]" for another folder.  
Thanks in advance for any help

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 14, 2007, 2:04pm UTC](https://community.mp3tag.de/t/replace/5009/2 "2007-06-14T14:04:11Z")

</div>

How should the final title looks like?  
"Just You & I []"  
"Just You & I []"  
"Just You & I "  
"Just You & I"

Something else?

---

<div class="post-metadata">

### Author: ![percepto](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@percepto](https://community.mp3tag.de/u/percepto)
#### Post date: [June 14, 2007, 2:14pm UTC](https://community.mp3tag.de/t/replace/5009/3 "2007-06-14T14:14:38Z")

</div>

To be honest I'd like to know (if possible) how to achieve all of the above variations!  
Thanks again for any help

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 14, 2007, 2:40pm UTC](https://community.mp3tag.de/t/replace/5009/4 "2007-06-14T14:40:39Z")

</div>

_Aktionstyp:_ **Ersetzen mit regulären Ausdrücken**  
_Feld:_ **TITLE**  
_Regulärer Ausdruck:_ **[(.\*)]**  
_Treffer ersetzen durch:_

This regular expression will match your [xx:yy]. If you replace it with nothing, you get the title without any length-information.

JFYI: You will get a space at the end of the title!

It's up to you to change this regular expression for your other variations. 😉

---

<div class="post-metadata">

### Author: ![percepto](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/3bc359/32.png) [@percepto](https://community.mp3tag.de/u/percepto)
#### Post date: [June 15, 2007, 5:38am UTC](https://community.mp3tag.de/t/replace/5009/5 "2007-06-15T05:38:38Z")

</div>

Thanks for the reply but is there any chance of an explanation then I don't have to keep pestering people for replies! It works great, but I can't understand why it works!  
[(.\*)] If you have time I would appreciate a quick rundown of how you arrived at this solution. For example what does the "" character do? How do I eliminate everything between 2 characters such as "[" and "]" and leave the "[" and "]" behind, or replace what is between those characters with something else?  
I appreciate your help and totally understand if you don't get a chance to explain it, or indeed if the explanation is too involved for a mere mortal like me to grasp!  
Once again, thanks a lot

---

<div class="post-metadata">

### Author: ![Sebastian\_Mares](https://community.mp3tag.de/user_avatar/community.mp3tag.de/sebastian_mares/32/9285_2.png) [@Sebastian\_Mares](https://community.mp3tag.de/u/Sebastian_Mares)
#### Post date: [June 15, 2007, 10:15am UTC](https://community.mp3tag.de/t/replace/5009/6 "2007-06-15T10:15:41Z")

</div>

[and] are special characters just like . is for example. In order to treat those brackets as brackets and not as special character you have to escape them with a backslash. This is described in the help file: [https://docs.mp3tag.de/actions/replace-regexp](https://docs.mp3tag.de/actions/replace-regexp). The paranthesis denotes that the characters inside it should be seen as a group and is only needed when you need to access that group later by using $1, or $2 or whatever (depending how many groups you have). A dot stands for a character and the asterisk means that it can occur any number of times, so .\* matches an unlimited number of characters. The final string [(._)] or [._] which would be OK for you too says that the RegExp engine should look for a square bracket followed by an unlimited number of characters followed by another closing square bracket. All this should be replaced with nothing -\> should be deleted.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [June 15, 2007, 1:33pm UTC](https://community.mp3tag.de/t/replace/5009/7 "2007-06-15T13:33:52Z")

</div>

@Sebastian: Thanks!

@percepto: Just Google for RegExp. Maybe this [http://www.greenend.org.uk/rjk/2002/06/regexp.html](http://www.greenend.org.uk/rjk/2002/06/regexp.html) or this [http://www.regular-expressions.info/](http://www.regular-expressions.info/) can be a starting point.

---

<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:20pm UTC](https://community.mp3tag.de/t/replace/5009/8 "2026-02-09T12:20:20Z")

</div>


