# Regex for missing title

**URL:** https://community.mp3tag.de/t/regex-for-missing-title/14147
**Category:** Support
**Created:** [November 19, 2012, 5:59pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147 "2012-11-19T17:59:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mitchind](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mitchind](https://community.mp3tag.de/u/mitchind)
#### Post date: [November 19, 2012, 5:59pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/1 "2012-11-19T17:59:01Z")

</div>

Newbie at this but have a lot working right now - just got stumped on MP3Tag's treatment of blank tags.

I have multiple files that display [Untitled] or [Untitled Track] for the %title% field.

I've tried to test using $strstr and $len - but $len seems to return the length as if it's filled in,  
and $strstr doesn't seem to be able to find "Untitled" anywhere in the string.

I've read thru the regex FAQ but nothing seems to indicate how to handle the possibilities

I just want to replace any of these missing titles or titles starting with "[Untitled" with  
"Untitled " + %track%

Is this has hard as I'm making it out to be?

Thanks for any help  
Don

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [November 19, 2012, 6:14pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/2 "2012-11-19T18:14:46Z")

</div>

> [@mitchind](#):
>
> I have multiple files that display [Untitled] or [Untitled Track] for the %title% field.

There's different ways of doing this but one is:

Begin Action Group **\_Script Test#TEST**

**Action #1** _Actiontype 5:_ **Format value** _Field \_\_\_\_\_\_:_ **TITLE** _Formatstring:_ **$regexp(%title%,'(?i)^\[untitled[^]]\*\]'$,$1 $num(%track%,2))**

End Action Group **\_Script Test#TEST** (1 Action)

It searches for the **%title%** to start with '**[**' then **untitled**. It then searches for anything but a '**]**' between 0 and an unlimited no. of times. Then a '**]**' This will match both:

**[Untitled]**

**[Untitled Track]**

 

And replace them with your desired format with the **%track%** formatted with 2 padded numbers.

 

See attached explanation of how regexp works.

 

 ![](https://community.mp3tag.de/uploads/default/original/2X/4/4158b4f9ed41209564b6347c30647284cba039fe.jpg)  

 

 ![](https://community.mp3tag.de/uploads/default/original/2X/4/4158b4f9ed41209564b6347c30647284cba039fe.jpg)

---

<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: [November 19, 2012, 6:18pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/3 "2012-11-19T18:18:56Z")

</div>

> [@mitchind](#):
>
> ... I have multiple files that display [Untitled] or [Untitled Track] for the %title% field. ...  
> I just want to replace any of these missing titles or titles starting with "[Untitled" with  
> "Untitled " + %track%  
> ...

One possible approach ...  
Converter: Tag - Tag  
Field: TITLE  
Format string: **$ifgreater($strstr(%TITLE%,'[Untitled'),0,'Untitled '%TRACK%,%TITLE%)**

DD.20121119.2015.CET

---

<div class="post-metadata">

### Author: ![mitchind](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mitchind](https://community.mp3tag.de/u/mitchind)
#### Post date: [November 19, 2012, 6:29pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/4 "2012-11-19T18:29:43Z")

</div>

Thanks for the quick reply - I'll give it a shot.

I assume I can try this from the Tag -\> filename rename window?

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [November 19, 2012, 6:47pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/5 "2012-11-19T18:47:03Z")

</div>

Use ![:mt_ttt:](https://community.mp3tag.de/uploads/default/original/1X/f8c08645074b054ac98070f71500627b98311bd2.png ":mt\_ttt:")

---

<div class="post-metadata">

### Author: ![mitchind](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@mitchind](https://community.mp3tag.de/u/mitchind)
#### Post date: [November 19, 2012, 6:47pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/6 "2012-11-19T18:47:19Z")

</div>

> [@DetlevD](#):
>
> One possible approach ...  
> Converter: Tag - Tag  
> Field: TITLE  
> Format string: **$ifgreater($strstr(%TITLE%,'[Untitled'),0,'Untitled '%TRACK%,%TITLE%)**
> 
> DD.20121119.2015.CET

That did it - thanks very much

---

<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:24pm UTC](https://community.mp3tag.de/t/regex-for-missing-title/14147/7 "2026-02-09T12:24:11Z")

</div>


