RosettaCodeData/Task/String-matching/PowerShell/string-matching.psh

6 lines
169 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
"spicywiener".StartsWith("spicy")
"spicywiener".Contains("icy")
"spicywiener".EndsWith("wiener")
"spicywiener".IndexOf("icy")
[regex]::Matches("spicywiener", "i").count