Strings In Depth7 / 16
Up next

Contains and -like

$s = "report-2024.csv"
# .Contains tests for a literal substring
Write-Output $s.Contains("2024")
# -like matches shell wildcards
Write-Output ($s -like "*.csv")
What you're solving

substring test vs wildcard match