Skip to content

Conversation

@stephentoub
Copy link
Member

RegexOptions.CultureInvariant is a nop unless RegexOptions.IgnoreCase is specified or the inline (?i) is used in the pattern, neither of which is done here.

RegexOptions.CultureInvariant is a nop unless RegexOptions.IgnoreCase is specified or the inline `(?i)` is used in the pattern, neither of which is done here.
@stephentoub stephentoub requested review from cston and joperezr May 2, 2022 14:30
@ghost ghost assigned stephentoub May 2, 2022
@ghost
Copy link

ghost commented May 2, 2022

Tagging subscribers to this area: @cston
See info in area-owners.md if you want to be subscribed.

Issue Details

RegexOptions.CultureInvariant is a nop unless RegexOptions.IgnoreCase is specified or the inline (?i) is used in the pattern, neither of which is done here.

Author: stephentoub
Assignees: stephentoub
Labels:

area-Microsoft.VisualBasic

Milestone: -

Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be an analyzer?

@stephentoub
Copy link
Member Author

Could be an analyzer?

It could, though it'd be hard for an analyzer to accurately handle most of these cases, anywhere the pattern isn't constant (since (?i) present in the expression can also trigger case-insensitivity.

@stephentoub stephentoub merged commit 0e1f46b into dotnet:main May 3, 2022
@stephentoub stephentoub deleted the nopcultureregex branch May 3, 2022 02:34
@ghost ghost locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants