MicrosoftDocs / PowerShell-Docs

The official PowerShell documentation sources
https://learn.microsoft.com/powershell
Creative Commons Attribution 4.0 International
1.96k stars 1.56k forks source link

split does not split from end #11083

Closed comet-crmiller closed 3 months ago

comet-crmiller commented 3 months ago

Type of issue

Code doesn't work

Feedback

"a,b,c,d,e,f,g,h" -split ",", -3 in this article indicates that the string will split starting from the end, and it does not. image

Page URL

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_split?view=powershell-7.4

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Core/About/about_Split.md

Author

@sdwheeler

Document Id

634c57a3-c4dc-7a04-381e-7ae326b40483

sdwheeler commented 3 months ago

You are running the command in Windows PowerShell 5.1 but looking at documentation for PowerShell 7.4.

image