Open joperezr opened 2 years ago
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions See info in area-owners.md if you want to be subscribed.
Author: | joperezr |
---|---|
Assignees: | - |
Labels: | `area-System.Text.RegularExpressions` |
Milestone: | - |
This does seem like a bug; char.IsWhitespace('\v')
is true, as is Regex.IsMatch("\v", @"\s")
. Presumably it'd be as simple as changing the Category[0xB]
value in the following table to be 'X':
https://github.com/dotnet/runtime/blob/aac729ff906a31f327823587748687c0308a4043/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs#L2060-L2062
We might want to dig a tad deeper, as it feels a little deliberate that cell was left as 0 rather than X.
While porting PCRE2 tests suite, one of the failing tests is:
This should probably be true and match other engines like PCRE as
\v
character should be ignored as whitespace and just have the pattern beab
cc: @stephentoub