# $strstr exist two or many strings

**URL:** <https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745>\
**Category:** Support\
**Created:** [February 24, 2017, 9:50am UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745 "2017-02-24T09:50:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![peymanch](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/65b543/32.png) [@peymanch](https://community.mp3tag.de/u/peymanch)\
**Post date:** [February 24, 2017, 9:50am UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/1 "2017-02-24T09:50:06Z")

</div>

**hi  
i want use $strstr for multi strings  
infact i want multi strings search on filename.  
for example  
filename 1 is: abcd  
filename 2 is: qwer  
filename 3 is: zxcv**

my incorrect $strstr is:  
$strstr(%\_filename%,'abcd' OR 'qwer' OR 'zxcv')

please correction that  
tnx

---

<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 24, 2017, 9:56am UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/2 "2017-02-24T09:56:29Z")

</div>

The comparison syntax would be:  
"$ifgreater($strstr(%\_filename%,'abcd'),0,yes,no)" IS yes

you would have to compare each substring separately but you can compose them to  
"$ifgreater($strstr(%\_filename%,'abcd'),0,yes,no)" IS yes OR "$ifgreater($strstr(%\_filename%,'efgh'),0,yes,no)" IS yes

---

<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 24, 2017, 10:57am UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/3 "2017-02-24T10:57:11Z")

</div>

> [@peymanch](#):
>
> ... i want use $strstr for ... multi strings search on filename. ...

Other proposal for a Filter expression ....

**"$ifgreater($len(%\_filename%),$len($replace(%\_filename%,'abcd',,'qwer',,'zxcv',,)),1,0)" IS "1"**

DD.20170224.1257.CET

---

<div class="post-metadata">

**Author:** ![peymanch](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/65b543/32.png) [@peymanch](https://community.mp3tag.de/u/peymanch)\
**Post date:** [February 24, 2017, 2:24pm UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/4 "2017-02-24T14:24:45Z")

</div>

> [@ohrenkino](#):
>
> The comparison syntax would be:  
> "$ifgreater($strstr(%\_filename%,'abcd'),0,yes,no)" IS yes
> 
> you would have to compare each substring separately but you can compose them to  
> "$ifgreater($strstr(%\_filename%,'abcd'),0,yes,no)" IS yes OR "$ifgreater($strstr(%\_filename%,'efgh'),0,yes,no)" IS yes

**no dear friend it's not work i want use multi string in format value and this is not supported IS and OR!**

---

<div class="post-metadata">

**Author:** ![peymanch](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/65b543/32.png) [@peymanch](https://community.mp3tag.de/u/peymanch)\
**Post date:** [February 24, 2017, 2:29pm UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/5 "2017-02-24T14:29:16Z")

</div>

> [@DetlevD](#):
>
> Other proposal for a Filter expression ....
> 
> **"$ifgreater($len(%\_filename%),$len($replace(%\_filename%,'abcd',,'qwer',,'zxcv',,)),1,0)" IS "1"**
> 
> DD.20170224.1257.CET

no dear friend i can't use length of string because it can be maybe more length  
i want use this  
$strstr(%\_filename%,(abcd|qwer|asdf))

---

<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 24, 2017, 2:30pm UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/6 "2017-02-24T14:30:22Z")

</div>

> [@peymanch](#):
>
> **no dear friend it's not work i want use multi string in format value and this is not supported IS and OR!**

That is why it would be much better if you said that in the first place. You misguided me by introducing the OR.

Right now I fear that you muck about with the filename instead of using the metadata of the fields to create a filename.

Anyway:  
$ifgreater($strstr(%\_filename%,'abcd'),0,yes,no)  
has everything you need: instead of "yes" or "no" insert that what you want to get in case it matches or it does not.

---

<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 24, 2017, 3:04pm UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/7 "2017-02-24T15:04:49Z")

</div>

> [@peymanch](#):
>
> no dear friend i can't use length of string because it can be maybe more length i want use this $strstr(%\_filename%,(abcd|qwer|asdf))

Hmm, did you try my proposal within the Mp3tag Filter section?  
It should work the way you have described your need.

Do you need a filterstring to display all related files?  
... or ...  
Do you need a formatstring to set a filename or tagfield value?

DD.20170224.1704.CET

---

<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:26pm UTC](https://community.mp3tag.de/t/strstr-exist-two-or-many-strings/18745/8 "2026-02-09T12:26:41Z")

</div>


