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

4 lines
334 B
PowerShell
Raw Permalink Normal View History

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