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
In the balancing group (?'g1-g2'exp), when the content matched by exp precedes the latest capture of g2, g1.Captures.Count and the actual behavior of g1 are inconsistent.
By checking the captures of the group using Group.Captures, you will find that the captures appear empty. However, when using (?(g1)yes|no) for conditional evaluation, it will match yes, indicating that there actually is a capture.
Description
In the balancing group
(?'g1-g2'exp)
, when the content matched byexp
precedes the latest capture ofg2
,g1.Captures.Count
and the actual behavior ofg1
are inconsistent.By checking the captures of the group using
Group.Captures
, you will find that the captures appear empty. However, when using(?(g1)yes|no)
for conditional evaluation, it will matchyes
, indicating that there actually is a capture.更多关于平衡组的bug,可以参考平衡组的bug·其二
For more information about this bug, please refer to Bug in Balancing Groups - Part 2
测试用例中,使用到了比较复杂的正则表达式。
In the test cases, more complex regular expressions are used.
Reproduction Steps
Output:
Expected behavior
Or
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: