COMBINING Unicode categories and/or Unicode blocks? #30649
Labels
dotnet-fundamentals/svc
Pri1
High priority, do before Pri2 and Pri3
product-question
Product usage related questions [org][type][category]
Type of issue
Other (describe below)
Description
[Enter feedback here]
Not really a feedback, just a QUESTION about the \p{...} thingy:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#unicode-category-or-unicode-block-p
The example at
https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#non-word-character-w
i. e.
…[^\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}\p{Lm}]…
...makes me think that every single \p{...} compound requires its own \p at the beginning, i. e. it is NOT possible to combine Unicode categories and/or Unicode blocks this way:
…\p{LtLoNdLm}…
or
…\p{Lt|Lo|Nd|Lm}…
Confirm?
I mean I did try both via regex101.com and none of the above worked ... but there may be some other trick, which is not mentioned on the above page.
Page URL
https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions
Content source URL
https://github.com/dotnet/docs/blob/live/docs/standard/base-types/character-classes-in-regular-expressions.md
Document Version Independent Id
95abea42-fa7f-3feb-ae38-049719ab938f
Article author
@adegeo
Metadata
The text was updated successfully, but these errors were encountered: