Strings In Depth16 / 16
Up next

-split with a limit

$path = "usr/local/bin/pwsh"
# -split takes a regex and a max-splits count
$head, $rest = $path -split '/', 2
Write-Output $head
Write-Output $rest
What you're solving

regex split into head and rest