docs icon indicating copy to clipboard operation
docs copied to clipboard

MS \s help page: \p{Z} does not match ANY separator character

Open PO1970 opened this issue 3 years ago • 0 comments

[Enter feedback here] This line is a bit confusing for learners:

https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#whitespace-character-s \p{Z} Matches ANY SEPARATOR CHARACTER.

I suppose you mean: Matches ANY OF THESE THREE separator characters: Zs, Zl, and Zp

If it matched ANY SEPARATOR CHARACTER, I could just enter [^\p{Z}] here:

https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#non-whitespace-character-s „...\S matches any non-white-space character. It is equivalent to the [^\f\n\r\t\v\x85\p{Z}] regular expression pattern...”

(I would not have to list newline, Tab, carriage return, etc... one by one.)

SEE ALSO:

Unicode categories: https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#SupportedUnicodeGeneralCategories

Z = All separator characters. This includes the Zs, Zl, and Zp categories.

I suppose you mean: This ONLY includes the Zs, Zl, and Zp categories.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

PO1970 avatar Aug 07 '22 20:08 PO1970