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
BUG? Different Behavior of Balancing Groups in Interpreted and Compiled Modes #111630
For the expression (?'name1-name2'), when entering balancing group (?'name1-name2', it will check if name2 has a capture in compiled RegularExpression, whereas it does nothing in interpreted mode.
Reproduction Steps
using System;
using System.Text.RegularExpressions;
var pattern = @"(?'2-1'(.))";
var input = @"1";
Match matchInterpreted = new Regex(pattern, RegexOptions.None).Match(input);
Match matchCompiled = new Regex(pattern, RegexOptions.Compiled).Match(input);
Console.WriteLine($"Interpreted: {matchInterpreted.Success}");
Console.WriteLine($"Compiled: {matchCompiled.Success}");
Activity
dotnet-policy-service commentedon Jan 20, 2025
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.
stephentoub commentedon Jan 23, 2025
Thanks. Will be fixed by #111769.