<t>The -Contains operator doesn't do substring comparisons and the match must be on a complete string and is used to search collections.<br/>
<br/>
From the documentation you linked to:<br/>
<br/>
<br/>
-Contains<br/>
Description: Containment operator. Tells whether a collection of reference values includes a single test value.<br/>
<br/>
In the example you provided you're working with a collection containing just one string item.<br/>
<br/>
If you read the documentation you linked to you'll see an example that demonstrates this behaviour:<br/>
<br/>
Examples:<br/>
<br/>
PS C:\> "abc", "def" -Contains "def"<br/>
True<br/>
<br/>
PS C:\> "Windows", "PowerShell" -Contains "Shell"<br/>
False #Not an exact match<br/>
<br/>
```<br/>
<br/>
I think what you want is the [`-Match`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-6#-match) operator:<br/>
<br/>
```<br/>
"12-18" -Match "-"<br/>
<br/>
```<br/>
<br/>
Which returns `True`.<br/>
<br/>
**Important:** As pointed out in the comments and in the [linked documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-6#-match), it should be noted that the `-Match` operator uses [regular expressions](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_regular_expressions?view=powershell-6) to perform text matching.</t>