# Problems with dash in scripting functions

**URL:** <https://community.mp3tag.de/t/problems-with-dash-in-scripting-functions/19727>\
**Category:** Support\
**Created:** [January 28, 2018, 7:49am UTC](https://community.mp3tag.de/t/problems-with-dash-in-scripting-functions/19727 "2018-01-28T07:49:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [January 28, 2018, 10:22am UTC](https://community.mp3tag.de/t/problems-with-dash-in-scripting-functions/19727/3 "2018-01-28T10:22:31Z")

</div>

> [@bookworm1632](#):
>
> ... The trouble was it didn't work - $strstr could find "- " and "-", but not " - " in the filename. ... it appears that $strstr has an issue with dashes ...

Try this formatstring ...

**$replace($left('Artist 1, Artist 2 - Title',$sub($strstr('Artist 1, Artist 2 - Title',' - '),1)),', ',' || ',)**

resp.

**$replace($left(%\_filename%,$sub($strstr(%\_filename%,' - '),1)),', ',' || ',)**

If you suspect any dash ambiguity then find there something useful ...  
[/t/16483/1](https://community.mp3tag.de/t/16483/1)  
[/t/15410/1](https://community.mp3tag.de/t/15410/1)

DD.20180128.1250.CET

---

_[View the full topic](https://community.mp3tag.de/t/problems-with-dash-in-scripting-functions/19727)._
