# Problem with regex

**URL:** https://community.mp3tag.de/t/problem-with-regex/4661
**Category:** Support
**Created:** [March 24, 2007, 12:18am UTC](https://community.mp3tag.de/t/problem-with-regex/4661 "2007-03-24T00:18:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![3TageBart](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/3/7ea924/32.png) [@3TageBart](https://community.mp3tag.de/u/3TageBart)
#### Post date: [March 24, 2007, 12:18am UTC](https://community.mp3tag.de/t/problem-with-regex/4661/1 "2007-03-24T00:18:58Z")

</div>

hi,

Some of my .wma files have Tags like this :

albumname[version]\version

I want to remove the last part beginning with the backslash, the problem is, that not all files have this format...

I`ve got this action :

field:  
album

regex :  
(.+?)[(.+?)]\\(.+?)

replace:  
$1[$2]

but it does not work ☹

---

<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: [March 24, 2007, 7:13am UTC](https://community.mp3tag.de/t/problem-with-regex/4661/2 "2007-03-24T07:13:50Z")

</div>

You could use something like this:

Action #1:  
_Action type:_ **Replace with regular expression**  
_Field:_ **ALBUM**  
_Regular expression:_ **\\.\*$**  
_Replace matches with:_

[] case-sensitive comparison

---

<div class="post-metadata">

### Author: ![3TageBart](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/3/7ea924/32.png) [@3TageBart](https://community.mp3tag.de/u/3TageBart)
#### Post date: [March 24, 2007, 12:03pm UTC](https://community.mp3tag.de/t/problem-with-regex/4661/3 "2007-03-24T12:03:47Z")

</div>

hmmm that expressions replaces all tags that include a backslash, some tags are like this : blabla/tatata/sdfsdf

they would be replaced too....

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [March 24, 2007, 12:56pm UTC](https://community.mp3tag.de/t/problem-with-regex/4661/4 "2007-03-24T12:56:06Z")

</div>

Change your expression to ^(.+?)[(.+?)]\\(.+?)$

---

<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/problem-with-regex/4661/5 "2026-02-09T12:20:13Z")

</div>


