# How can I insert a dash in a specific place?

**URL:** https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199
**Category:** Support
**Created:** [March 28, 2010, 11:56am UTC](https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199 "2010-03-28T11:56:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![scottyb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@scottyb](https://community.mp3tag.de/u/scottyb)
#### Post date: [March 28, 2010, 11:56am UTC](https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199/1 "2010-03-28T11:56:06Z")

</div>

Hello,

I have hundreds of mp3s where the title and filename begin with a 5-digit number.

How can I insert a dash and space in the seventh position from the left?

For example:  
00001 Chapter 1  
to  
00001 - Chapter 1

I know I could replace "Chapter" with"- Chapter", but that won't work because the text after the serial numbers are all different (they don't all say "Chapter")

**Is there an action I can write to insert a charcter in an exact spot, a certain number of places from the left or right side?**

I haven't created an action yet (just used the quick actions), so a detailed explanation would be greatly appeciated. 🙂

TIA  
Scott

---

<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: [March 28, 2010, 1:05pm UTC](https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199/2 "2010-03-28T13:05:07Z")

</div>

> [@scottyb](#):
>
> For example:  
> 00001 Chapter 1  
> to  
> 00001 - Chapter 1

Create an action: Press Alt-5, Press the "New" button in that dialog, enter a meaningful name for the action e.g. "Insert hyphen after number".  
(this was the general how-to for actions, now comes the more specific part)  
Create an action of the type "Replace with regular expression.  
As field select \_Filename  
as regular expression enter:  
^(\d+ )  
as replace pattern enter:  
$1 -  
(please note that there is a blank after the hyphen!)

Store the action by pressing a sequence of OK buttons.  
Select a file for test-conversion, select the action from the toolbar-dropdown-action-list.  
If the result is satisfactory let MP3tag do the work for you. 😉

---

<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: [March 28, 2010, 2:10pm UTC](https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199/3 "2010-03-28T14:10:17Z")

</div>

> [@scottyb](#):
>
> ... How can I insert a dash and space in the seventh position from the left?  
> For example:  
> 00001 Chapter 1  
> to  
> 00001 - Chapter 1  
> **Is there an action I can write to insert a charcter in an exact spot, a certain number of places from the left or right side?**

Beside some other ways you can go the way using action "Format value" and Mp3tag Scripting Language.

Field: TITLE  
Formatstring: $left(%TITLE%,6)'- '$right(%TITLE%,$sub($len(%TITLE%),6))

From:  
00001 Chapter 1  
To:  
00001 - Chapter 1

How to operate and use Mp3tag, that is your thing to find out.

DD.20100328.1810.CEST

---

<div class="post-metadata">

### Author: ![scottyb](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/7c8e57/32.png) [@scottyb](https://community.mp3tag.de/u/scottyb)
#### Post date: [April 1, 2010, 9:46am UTC](https://community.mp3tag.de/t/how-can-i-insert-a-dash-in-a-specific-place/10199/4 "2010-04-01T09:46:19Z")

</div>

> [@DetlevD](#):
>
> Beside some other ways you can go the way using action "Format value" and Mp3tag Scripting Language.
> 
> Field: TITLE  
> Formatstring: $left(%TITLE%,6)'- '$right(%TITLE%,$sub($len(%TITLE%),6))
> 
> From:  
> 00001 Chapter 1  
> To:  
> 00001 - Chapter 1
> 
> How to operate and use Mp3tag, that is your thing to find out.
> 
> DD.20100328.1810.CEST

Thanks ohrenkino and DetlevD

Both ways given worked

Ohrenkino's way worked (i think) because it followed a number  
DetlevD's format string worked like a charm (wether it follows a number or not)

I'm trying to learn the scripting, but for someone completely new to it, it's a little hard to learn from the help file.

Thanks again

---

<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-can-i-insert-a-dash-in-a-specific-place/10199/5 "2026-02-09T12:22:16Z")

</div>


