I'm having trouble in an azure devops pipeline.
$(Build.SourceBranch) outputs something like refs/heads/xyz
I'd like to use something like JavaScript's .split('/') to output an array at the slashes.
Meaning $b = $(Build.SourceBranch).Split('/') would output
$b[0] = "refs"
$b[1] = "heads"
$b[2] = "xyz"
I'm not finding much on how I can do this easily.

$(Build.SourceBranchName)split(variables.str, ',')but changing the symbol to/as you want it?