RosettaCodeData/Task/Tokenize-a-string-with-escaping/PowerShell/tokenize-a-string-with-escaping-2.psh
2023-07-01 13:44:08 -04:00

3 lines
334 B
Text

Split-String "one^|uno||three^^^^|four^^^|^cuatro|" -Separator "|" -Escape "^" | ForEach-Object `
-Begin {$n = 0} `
-Process {$n+= 1; "{0}: {1}" -f $n, $_}