# Finding titles without spaces between words

**URL:** https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676
**Category:** Support
**Created:** [February 6, 2017, 7:15pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676 "2017-02-06T19:15:41Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 6, 2017, 7:15pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/1 "2017-02-06T19:15:41Z")

</div>

I have a problem with unknown numbers of files, which got their titles messed up: the pauses between words [and other signs] are missing

I have found this ready to use code [Regular Expressions](https://community.mp3tag.de/t/521/41), but I cannot use it just yet. Because, there can be original titles, that have combination of small and capital letters on purpose. And so I have to manually check all the case; and only after doing so, treat my files

So what would be the filter expression, to find for example

```
TitleOfASong
SomeOtherSong(2010Mix)
YetAnotherSong{Intrumental}+YetAnotherSong?
```

---

<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: [February 6, 2017, 7:18pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/2 "2017-02-06T19:18:58Z")

</div>

see e.g. the Camel Case expression:  
[Regular Expressions](https://community.mp3tag.de/t/521/33)

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 7, 2017, 6:33pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/3 "2017-02-07T18:33:29Z")

</div>

Thank you, that works

Unfortunately I was not able to adapt it to a filter [so I cannot use it yet]

---

<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: [February 7, 2017, 6:39pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/4 "2017-02-07T18:39:25Z")

</div>

> [@zerow](#):
>
> Thank you, that works
> 
> Unfortunately I was not able to adapt it to a filter [so I cannot use it yet]

"$if($eql($len($regexp(%title%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 7, 2017, 8:42pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/5 "2017-02-07T20:42:27Z")

</div>

> [@ohrenkino](#):
>
> "$if($eql($len($regexp(%title%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"

Something is wrong

It just narrowed down selection to 86% of all of my files. And I wasn't able to spot among them a single case in question

---

<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: [February 8, 2017, 5:47am UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/6 "2017-02-08T05:47:30Z")

</div>

> [@zerow](#):
>
> Something is wrong
> 
> It just narrowed down selection to 86% of all of my files. And I wasn't able to spot among them a single case in question

Probably it is a missing ().  
I do not have such files, so I cannot test it.

The basic idea: if you add the space character between the camel case letters, the length of the new string is not the length of the original string. All other strings remain the same, so the lengths match.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 8, 2017, 10:38am UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/7 "2017-02-08T10:38:37Z")

</div>

> [@ohrenkino](#):
>
> "$if($eql($len($regexp(%title%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"

> [@zerow](#):
>
> Something is wrong
> 
> It just narrowed down selection to 86% of all of my files. And I wasn't able to spot among them a single case in question

> [@ohrenkino](#):
>
> Probably it is a missing ().  
> I do not have such files, so I cannot test it.
> 
> The basic idea: if you add the space character between the camel case letters, the length of the new string is not the length of the original string. All other strings remain the same, so the lengths match.

Way over my head

But I do see a missing bracket in a middle. So I tried variations

```
"$if($eql($len($regexp(%title%,'(?<!^)(\u\l|(?<=\l)[\u\d]))',' $1')),$len(%title%)),1,0)" IS "0"
"$if($eql($len($regexp(%title%,'(?<!^)(\u\l|)(?<=\l)[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"
"$if($eql($len($regexp(%title%,'(?<!^)(\u\l|(?<=\l))[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"
"$if($eql($len($regexp(%title%,'(?<!^)(\u\l|(?<=\l))([\u\d])',' $1')),$len(%title%)),1,0)" IS "0"
"$if($eql($len($regexp(%title%,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1')),$len(%title%)),1,0)" IS "0"With no luck. It still does not work

```

---

<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: [February 8, 2017, 11:01am UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/8 "2017-02-08T11:01:25Z")

</div>

In post #3 you say that you got the desired result with a regexp.  
So just take it and insert it in the following $if:

"$if($eql($len(_ **regexp here** _),$len(%artist%)),1,0)" IS "0"

Instead of %artist% put the correct fieldname.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 8, 2017, 8:34pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/9 "2017-02-08T20:34:29Z")

</div>

Well, this

```
$regexp(%TITLE%,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1')put in action as format value for the field TITLE makes the desired corrections on test names provide by me in post <a href="/t/18676/1" target="_blank">#1</a>

```

But this  
"$if($eql($len($regexp(%TITLE%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%TITLE%)),1,0)" IS "0"put in in the filter box "narrows down" to 86% but I still cannot spot a single case of what I am looking in those 86%; unless I add those test files to loaded files- but this code also shows control versions of them with correct titles [with pauses]

---

<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: [February 9, 2017, 5:49am UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/10 "2017-02-09T05:49:54Z")

</div>

> [@zerow](#):
>
> I have a problem with unknown numbers of files, which got their titles messed up: the pauses between words [and other signs] are missing ... there can be original titles, that have combination of small and capital letters on purpose. ... So what would be the filter expression, to find for example  
> TitleOfASong  
> SomeOtherSong(2010Mix)  
> YetAnotherSong{Intrumental}+YetAnotherSong

This filter expression ...

 "$ifgreater($len($regexp(%TITLE%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%TITLE%),1,0)" EQUAL "1"

... compares the length of the virtually splitted CamelCase TITLE string with the length of the original TITLE string, ... and this way it triggers the filter to display such files.

To reduce the filter view only to files having TITLE strings without space character ...

 "$ifgreater($len($regexp(%TITLE%,'(?\<!^)(\u\l|(?\<=\l)[\u\d])',' $1')),$len(%TITLE%),1,0)" EQUAL "1" AND NOT %TITLE% HAS " "

DD.20170209.1207.CET

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [February 9, 2017, 4:19pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/11 "2017-02-09T16:19:11Z")

</div>

> [@DetlevD](#):
>
> This filter expression ...
> 
> ```
> "$ifgreater($len($regexp(%TITLE%,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1')),$len(%TITLE%),1,0)" EQUAL 1
> 
> ```
> 
> ... compares the length of the virtually splitted CamelCase TITLE string with the length of the original TITLE string, ... and this way it triggers the filter to display such files.
> 
> To reduce the filter view only to files having TITLE strings without space character ...
> 
> ```
> "$ifgreater($len($regexp(%TITLE%,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1')),$len(%TITLE%),1,0)" EQUAL "1" AND NOT %TITLE% HAS " "
> 
> ```

That works exactly as is should. Thank you very much

I think that your post should be added to that Support sections collecting useful codes

As for my search result it was just as I expected: there were dozens of cases of original / intentional CamelCases and Cases-With-Multiple-Hyphens

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 1:27pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/12 "2019-06-12T13:27:59Z")

</div>

How about if I all of my TITLEs now how a single pause at the end? How do add a disregard for it to that code?

Currently I use a workaround: I copy all of the files, execute an action that removes pauses at the end of the TITLE and then use that already working filter code `"$ifgreater($len($regexp(%TITLE%,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1')),$len(%TITLE%),1,0)" EQUAL "1" AND NOT %TITLE% HAS " "`. But that is both a time and a hard drive space consuming tiresome thing to perform  
``  
``  
[And the pause at the end of TITLE I use for the purpose of coping to Filter box- when I want to quickly check something out and I am using only a mouse, like when I am laying on a bed, then I can select such TITLE, past it into the Filter box and then past anything else copied form some place- and get a most simple filtering and expression consisting of some more data

---

<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: [June 12, 2019, 1:38pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/13 "2019-06-12T13:38:31Z")

</div>

> [@Zerow](#):
>
> EQUAL

Try  
`"$if($eql($len(%artist%),$len($trim(%artist%))),1,0)" IS "0"`  
to find files where there is a trailing or leading space - in this case in the field ARTIST.

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 2:21pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/14 "2019-06-12T14:21:37Z")

</div>

Unfortunately

`"$if($eql($len(%TITLE%),$len($trim(%TITLE%))),1,0)" IS "0"`

gave me 14974 out of 14 977 files. I thought that maybe the remaining 3 would be the ones in question, but no. Those left seem to be the ones who happen to not have a pause at the end of TITLE

---

<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: [June 12, 2019, 2:38pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/15 "2019-06-12T14:38:52Z")

</div>

Then I did not understand what you mean by

> [@Zerow](#):
>
> How about if I all of my TITLEs now how a single pause at the end? How do ass a disregard for it to that code?

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 3:27pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/16 "2019-06-12T15:27:27Z")

</div>

That `ass` is suppose to be ``add```; I just corrected it  
``  
``  
The code from two years ago finds cases like

1 `TitleOfSomeSong`

but is unable to show

2 `TitleOfSomeSong_`

3 `Title Of Some Song_`

4 `Title Of Some Song`

where the underscore `_` shows where the pause is. The 1 and 2 is what am looking for, the 3 and 4 are just for reference [I do not want the code to filter them out]

---

<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: [June 12, 2019, 3:44pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/17 "2019-06-12T15:44:00Z")

</div>

Perhaps this works:  
`"$ifgreater($trim($len($regexp('TitleOfSomeSong ','(?<!^)(\u\l|(?<=\l)[\u\d])',' $1'))),$trim($len('TitleOfSomeSong')),1,0)"`

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 6:11pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/18 "2019-06-12T18:11:02Z")

</div>

Unfortunately

`$ifgreater($trim($len($regexp(%TITLE% ,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1'))),$trim($len(%TITLE%)),1,0)`

`"$ifgreater($trim($len($regexp(%TITLE% ,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1'))),$trim($len(%TITLE%)),1,0)"`

do not work. They do not show any results

---

<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: [June 12, 2019, 6:18pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/19 "2019-06-12T18:18:15Z")

</div>

You do realize that this is just the first part and that you have to complete the filter expression, don't you?

---

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [June 12, 2019, 7:49pm UTC](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676/20 "2019-06-12T19:49:06Z")

</div>

Now I do

But if this

`"$ifgreater($trim($len($regexp(%TITLE% ,'(?<!^)(\u\l|(?<=\l)[\u\d])',' $1'))),$trim($len(%TITLE%)),1,0)" IS "0"`

is suppose to be the sollution to the problem, then it is not a correct one

[Next page](https://community.mp3tag.de/t/finding-titles-without-spaces-between-words/18676.md?page=2)
