RosettaCodeData/Task/Tokenize-a-string-with-escaping/PowerShell/tokenize-a-string-with-escaping-2.psh

4 lines
334 B
Text
Raw Permalink Normal View History

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