You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regex empty string alternate does not match correctly #135329
The regex pattern "(?:a+|){2}" does not match the input "a" for both compiled and interpreted regex.
Reproduction Steps
usingSystem;usingSystem.Text.RegularExpressions;varre=newRegex("(?:a+|){2}",RegexOptions.None);// also works with .CompiledConsole.WriteLine(re.IsMatch("a"));
Activity
dotnet-policy-service commentedon Oct 7, 2026
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.