# Searching filename to generate %title% from multiple hyphens

**URL:** https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942
**Category:** Support
**Created:** [January 14, 2012, 9:40pm UTC](https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942 "2012-01-14T21:40:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [January 14, 2012, 9:40pm UTC](https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942/1 "2012-01-14T21:40:10Z")

</div>

I have these files that have all hyphens and I'm having a hard time to figuring out a regular expression with a proper guess pattern to populate the Title tag. Here is an example:

61-Oh-Yeah-1Bar-61.2bpm.mp3

So the title is "Oh-Yeah-1Bar"

I can remove the hyphens later to clean it up. I have various files that have variants of the file name with variants of the size of the bpm at the end of file. So my simple search of "everything BETWEEN the hyphens" would then create my %title% for me.

Can someone help me build an expression to have everything "between" the first hyphen to the last hyphen to become my new title tag?

Thank you

Chris

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [January 15, 2012, 8:22am UTC](https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942/2 "2012-01-15T08:22:09Z")

</div>

> [@kittmaster](#):
>
> Can someone help me build an expression to have everything "between" the first hyphen to the last hyphen to become my new title tag?

Action: Format Value  
Field: TITLE  
Formatstring: $regexp(%\_filename%,.+?-(.+)-.+,$1)

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [January 15, 2012, 9:17pm UTC](https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942/3 "2012-01-15T21:17:14Z")

</div>

I'll give that a whirl, thank you!

---

<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:23pm UTC](https://community.mp3tag.de/t/searching-filename-to-generate-title-from-multiple-hyphens/12942/4 "2026-02-09T12:23:34Z")

</div>


