# Remove hyphens in filename

**URL:** <https://community.mp3tag.de/t/remove-hyphens-in-filename/45248>\
**Category:** Support\
**Created:** [April 26, 2019, 1:48am UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248 "2019-04-26T01:48:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [April 26, 2019, 1:48am UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248/1 "2019-04-26T01:48:53Z")

</div>

I'm wonder if I can use your REGEXP to delete a Hyphen anywhere in the Filename.

Action (quick)  
Action type = replace with regex  
Field = _filename  
regexp = "everything you have but replace %TITLE% With %FILENAME%,  
replace "_" with"-"  
here's my filename example:  
katy perry - firework - one - (official - acapella)

The idea is to delete any of these hyphens

THANK YOU

---

<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 26, 2019, 5:43am UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248/2 "2019-04-26T05:43:18Z")

</div>

If you want to delete a text constant (and no pattern) use a simple $replace() function or an action of the type simple replace.

If I see your example correctly, you do not only want to replace the hyphen but also the following space character as well.

---

<div class="post-metadata">

**Author:** ![sy45yhtyj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ecd19e/32.png) [@sy45yhtyj](https://community.mp3tag.de/u/sy45yhtyj)\
**Post date:** [April 26, 2019, 3:53pm UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248/3 "2019-04-26T15:53:37Z")

</div>

Sorry, Ohrenkino for not being clear.

This is the filename: Katy - perry - firework - one - (official - acapella)

There are 5 hyphens in the filename. What's the best way to delete one, two, three or all of the hyphens...

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:** [April 26, 2019, 3:58pm UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248/4 "2019-04-26T15:58:05Z")

</div>

> [@sy45yhtyj](#):
>
> What's the best way to delete all of the hyphens

Use an action of the type "Replace" for field \_FILENAME  
Search string: `- `  
Replace string:  
(leave empty)

Or use the function Convert\>Tag-Tag for \_FILENAME  
Format string: `$replace(%_filename%,- ,)`

---

<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:28pm UTC](https://community.mp3tag.de/t/remove-hyphens-in-filename/45248/5 "2026-02-09T12:28:03Z")

</div>


