# How do I replace the third character in a string?

**URL:** https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357
**Category:** Support
**Created:** [April 27, 2010, 1:08pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357 "2010-04-27T13:08:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Black\_Milk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@Black\_Milk](https://community.mp3tag.de/u/Black_Milk)
#### Post date: [April 27, 2010, 1:08pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/1 "2010-04-27T13:08:28Z")

</div>

Hi,

I want to replace the third character in \_Filename with ' '.  
How do I do it?

Thanks a lot,  
David

---

<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: [April 28, 2010, 6:29am UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/2 "2010-04-28T06:29:34Z")

</div>

> [@Black Milk](#):
>
> ... third character in \_Filename with ' '.  
> How do I do it?
> 
> Thanks a lot,  
> David

create a format tag field action:  
format %\_filename% with  
$left(%\_filename%,2) $mid(%\_filename%,3,$len(%\_filename%))

(the blank between the 2 $-commands is your inserted blank).

---

<div class="post-metadata">

### Author: ![Black\_Milk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@Black\_Milk](https://community.mp3tag.de/u/Black_Milk)
#### Post date: [April 28, 2010, 12:52pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/3 "2010-04-28T12:52:36Z")

</div>

> [@ohrenkino](#):
>
> create a format tag field action:  
> format %\_filename% with  
> $left(%\_filename%,2) $mid(%\_filename%,3,$len(%\_filename%))
> 
> (the blank between the 2 $-commands is your inserted blank).

Hi,

Thanks for your reply.  
Maybe I did something wrong, but that just added a blank to the left of the third character.  
i.e. if filename is 12a4, it's now 12 a4.  
Here's what I did:

1. Created a new action.
2. Action type: Format Value.
3. Field: \_FILENAME.
4. Format string: $left(%\_filename%,2) $mid(%\_filename%,3,$len(%\_filename%))

Is that what you meant?

Thanks,  
David

---

<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: [April 28, 2010, 3:11pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/4 "2010-04-28T15:11:58Z")

</div>

> [@Black Milk](#):
>
> ...  
> Here's what I did:
> 
> 1. Created a new action.
> 2. Action type: Format Value.
> 3. Field: \_FILENAME.
> 4. Format string: $left(%\_filename%,2) $mid(%\_filename%,3,$len(%\_filename%))  
> ...

Basically that's right.  
Now you may experiment a little with the second part and move the starting point of the "middle string" more to the right:  
Format string: $left(%\_filename%,2) $mid(%\_filename%, **4** ,$len(%\_filename%))

---

<div class="post-metadata">

### Author: ![Black\_Milk](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@Black\_Milk](https://community.mp3tag.de/u/Black_Milk)
#### Post date: [April 29, 2010, 12:05pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/5 "2010-04-29T12:05:02Z")

</div>

> [@ohrenkino](#):
>
> Basically that's right.  
> Now you may experiment a little with the second part and move the starting point of the "middle string" more to the right:  
> Format string: $left(%\_filename%,2) $mid(%\_filename%, **4** ,$len(%\_filename%))

I'm not really sure I understand but it works 😛  
Thanks a lot! ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

---

<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:22pm UTC](https://community.mp3tag.de/t/how-do-i-replace-the-third-character-in-a-string/10357/6 "2026-02-09T12:22:20Z")

</div>


