RosettaCodeData/Task/String-matching/PowerShell/string-matching.psh
2023-07-01 13:44:08 -04:00

5 lines
169 B
Text

"spicywiener".StartsWith("spicy")
"spicywiener".Contains("icy")
"spicywiener".EndsWith("wiener")
"spicywiener".IndexOf("icy")
[regex]::Matches("spicywiener", "i").count