String nach einem Teilstring durchsuchen
ID | 229 |
---|---|
Link Reference | Not set |
Link Credits | Not set |
Link Technical Documentation | Not set |
PlCodelang | PowerShell |
PlGroup | Strings |
PlItemTitle | String nach einem Teilstring durchsuchen |
Code | # See also a good hint with explanation between like and contains: # http://windowsitpro.com/blog/powershell-contains $fullstring = "This is my string"; if ($fullstring -like "*my*") { Write-Host "found" -ForegroundColor Green; } else { Write-Host "nope" -ForegroundColor Red; } |
Result Example |