← Back to Pull requests

build(deps): bump fancy-regex from 0.20.0 to 0.20.2 #183

Closed
unknown closed this pull request without merging on Nov 19, 2026 23:08 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 19:24 UTC
Author

Bumps fancy-regex from 0.20.0 to 0.20.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/fancy-regex/fancy-regex/releases">fancy-regex's releases</a>.</em></p>
<blockquote>
<h2>0.20.2</h2>
<h3>Added</h3>
<h3>Changed</h3>
<h3>Fixed</h3>
<ul>
<li>Fixed more cases where the optimizations made were unsound (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/333">#333</a>)</li>
</ul>
<h2>0.20.1</h2>
<h3>Added</h3>
<ul>
<li>A new <code>Expr::has_descendant_or_self</code> method to easily traverse the Expr descendants to find an Expr matching a predicate. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/319">#319</a>)</li>
<li>Add a <code>RegexOptionsBuilder::optimize</code> / <code>RegexBuilder::optimize</code> flag to disable the expression-tree optimization pass (enabled by default), and rework it into two tiers: <code>optimize()</code> now takes an <code>OptimizeOptions</code> struct with a <code>find_not_empty</code> flag that skips only the KeepOut (<code>\K</code>) and trailing-lookahead rewrites, while the safe rewrites still apply — so <code>find_not_empty</code> patterns benefit from them instead of skipping the whole pass. The decision on whether to optimize is centralized on <code>RegexOptions::should_optimize</code> and forwarded to the prefilter helpers (<code>start_bytes</code>, <code>required_bytes</code>) so they analyze the same tree as the compile path. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/323">#323</a>)</li>
<li>Support control character escapes <code>\cX</code> and <code>\C-X</code> in Oniguruma mode, e.g. <code>\ca</code> matches <code>\x01</code> and <code>\c\\</code> matches <code>\x1C</code>, both inside and outside of character classes. Without Oniguruma mode they are still invalid escapes. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/320">#320</a>)</li>
</ul>
<h3>Changed</h3>
<h3>Fixed</h3>
<ul>
<li>Positive lookaheads are now atomic, as in Oniguruma and PCRE: once a lookahead has matched, a later failure no longer backtracks into it to try another way of matching it. For example <code>(?=x|(x))\1x</code> no longer matches <code>xx</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/313">#313</a>)</li>
<li>A hard variable-length lookbehind no longer reuses the candidate start positions left behind by a previous lookbehind that matched (or by a negative lookbehind whose body matched), which gave wrong results such as <code>(b)(?&lt;!\1)c</code> matching <code>abc</code>, or hit the backtrack limit when a pattern had two such lookbehinds, like <code>(a)b(?&lt;=\1b)(c)d(?&lt;=\2d)</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/314">#314</a>)</li>
<li>A repetition with a minimum count whose body can match an empty string (e.g. <code>(?:a|(?=b)){2,}</code>) could stop before reaching the minimum when it ran again at a position its previous run had reached, for example inside a repeated lookahead: <code>(?:(?=(?:a|(?=b)){2,})a){2}</code> matched <code>aa</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/312">#312</a>)</li>
<li>A <code>{n,}</code> repetition whose body can match an empty string ended as soon as an iteration matched empty, even below the minimum. When the first iteration matched empty, the last required one now still runs, so <code>(?:(?=^)a
){2,}b</code> matches <code>aab</code>. A body that reads a capture group it sets itself can match differently in the next iteration, so there all required iterations run, and <code>^(?:(?(1)a|())){3,}$</code> no longer matches an empty string. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/325">#325</a>)</li>
<li>A conditional whose condition fails no longer leaves its entry on the VM's explicit stack. Before, an enclosing atomic group or possessive repeat read that entry at its end and kept its backtrack branches: <code>(z)?(?&gt;a(?(1)x))a</code> matched &quot;aaa&quot;. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/316">#316</a>)</li>
<li>A conditional whose true branch is a group of alternatives, such as <code>(?(1)(?:a|b))</code>, was parsed as <code>(?(1)a|b)</code>, so <code>b</code> became the false branch. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/315">#315</a>)</li>
<li>Inline flags set inside a capturing, named, atomic, lookaround, conditional or absent group, like <code>(a(?i)b)c</code>, now end with the group. Before, they leaked to the rest of the pattern, so <code>(a(?i)b)c</code> matched <code>aBC</code> and <code>(?x)G(o(?-x)o) g</code> did not ignore the spaces after the group. Only <code>(?:...)</code> and <code>(?flags:...)</code> restored them. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/317">#317</a>)</li>
<li>In Oniguruma mode, <code>{,}</code> is now literal text, as in Oniguruma, instead of being parsed as <code>{0,}</code>. For example <code>(?:ab){,}</code> matches <code>ab{,}</code>. <code>{,n}</code> is still <code>{0,n}</code>, and without Oniguruma mode <code>{,}</code> is unchanged. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/321">#321</a>)</li>
<li>In Oniguruma mode, a <code>?</code> after an interval with swapped limits, like <code>a{3,2}?</code>, is now another quantifier, as in Oniguruma, so it makes the possessive <code>a{2,3}</code> optional. Before, it made the repeat lazy, so <code>a{3,2}?</code> matched <code>aa</code> in <code>aaa</code> and didn't match an empty string. A <code>?</code>, <code>
</code> or <code>+</code> after a repeated empty group, like in <code>(?:)*</code> or <code>(?:){3,2}?</code>, is now dropped along with it instead of failing to parse. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/322">#322</a>)</li>
<li>In Oniguruma mode, a <code>?</code> after a fixed interval, like <code>a{3}?</code>, is now another quantifier, as in Oniguruma, so <code>a{3}?</code> means <code>(?:a{3})?</code>. Before, it made the repeat lazy, which doesn't change anything for a fixed count, so <code>a{3}?</code> didn't match <code>aa</code> and <code>a{3}??</code> matched <code>aaa</code> instead of an empty string. <code>a{3,3}?</code> is still lazy, and without Oniguruma mode <code>a{3}?</code> is unchanged.</li>
<li>A backref or conditional inside the group it refers to now sees the group's previous capture, as in PCRE and Perl. Before, it saw the new start of the group with the end of its previous capture, so <code>(?:(\1|a)b){2}</code> panicked on <code>abab</code> and <code>^((?(1)b|a))$</code> matched <code>b</code> but not <code>a</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/328">#328</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/fancy-regex/fancy-regex/blob/main/CHANGELOG.md">fancy-regex's changelog</a>.</em></p>
<blockquote>
<h2>[0.20.2] - 2026-11-11</h2>
<h3>Added</h3>
<h3>Changed</h3>
<h3>Fixed</h3>
<ul>
<li>Fixed more cases where the optimizations made were unsound (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/333">#333</a>)</li>
</ul>
<h2>[0.20.1] - 2026-11-09</h2>
<h3>Added</h3>
<ul>
<li>A new <code>Expr::has_descendant_or_self</code> method to easily traverse the Expr descendants to find an Expr matching a predicate. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/319">#319</a>)</li>
<li>Add a <code>RegexOptionsBuilder::optimize</code> / <code>RegexBuilder::optimize</code> flag to disable the expression-tree optimization pass (enabled by default), and rework it into two tiers: <code>optimize()</code> now takes an <code>OptimizeOptions</code> struct with a <code>find_not_empty</code> flag that skips only the KeepOut (<code>\K</code>) and trailing-lookahead rewrites, while the safe rewrites still apply — so <code>find_not_empty</code> patterns benefit from them instead of skipping the whole pass. The decision on whether to optimize is centralized on <code>RegexOptions::should_optimize</code> and forwarded to the prefilter helpers (<code>start_bytes</code>, <code>required_bytes</code>) so they analyze the same tree as the compile path. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/323">#323</a>)</li>
<li>Support control character escapes <code>\cX</code> and <code>\C-X</code> in Oniguruma mode, e.g. <code>\ca</code> matches <code>\x01</code> and <code>\c\\</code> matches <code>\x1C</code>, both inside and outside of character classes. Without Oniguruma mode they are still invalid escapes. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/320">#320</a>)</li>
</ul>
<h3>Changed</h3>
<h3>Fixed</h3>
<ul>
<li>Positive lookaheads are now atomic, as in Oniguruma and PCRE: once a lookahead has matched, a later failure no longer backtracks into it to try another way of matching it. For example <code>(?=x|(x))\1x</code> no longer matches <code>xx</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/313">#313</a>)</li>
<li>A hard variable-length lookbehind no longer reuses the candidate start positions left behind by a previous lookbehind that matched (or by a negative lookbehind whose body matched), which gave wrong results such as <code>(b
)(?&lt;!\1)c</code> matching <code>abc</code>, or hit the backtrack limit when a pattern had two such lookbehinds, like <code>(a)b(?&lt;=\1b)(c)d(?&lt;=\2d)</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/314">#314</a>)</li>
<li>A repetition with a minimum count whose body can match an empty string (e.g. <code>(?:a|(?=b)){2,}</code>) could stop before reaching the minimum when it ran again at a position its previous run had reached, for example inside a repeated lookahead: <code>(?:(?=(?:a|(?=b)){2,})a){2}</code> matched <code>aa</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/312">#312</a>)</li>
<li>A <code>{n,}</code> repetition whose body can match an empty string ended as soon as an iteration matched empty, even below the minimum. When the first iteration matched empty, the last required one now still runs, so <code>(?:(?=^)a){2,}b</code> matches <code>aab</code>. A body that reads a capture group it sets itself can match differently in the next iteration, so there all required iterations run, and <code>^(?:(?(1)a|())){3,}$</code> no longer matches an empty string. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/325">#325</a>)</li>
<li>A conditional whose condition fails no longer leaves its entry on the VM's explicit stack. Before, an enclosing atomic group or possessive repeat read that entry at its end and kept its backtrack branches: <code>(z)?(?&gt;a
(?(1)x))a</code> matched &quot;aaa&quot;. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/316">#316</a>)</li>
<li>A conditional whose true branch is a group of alternatives, such as <code>(?(1)(?:a|b))</code>, was parsed as <code>(?(1)a|b)</code>, so <code>b</code> became the false branch. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/315">#315</a>)</li>
<li>Inline flags set inside a capturing, named, atomic, lookaround, conditional or absent group, like <code>(a(?i)b)c</code>, now end with the group. Before, they leaked to the rest of the pattern, so <code>(a(?i)b)c</code> matched <code>aBC</code> and <code>(?x)G(o(?-x)o) g</code> did not ignore the spaces after the group. Only <code>(?:...)</code> and <code>(?flags:...)</code> restored them. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/317">#317</a>)</li>
<li>In Oniguruma mode, <code>{,}</code> is now literal text, as in Oniguruma, instead of being parsed as <code>{0,}</code>. For example <code>(?:ab){,}</code> matches <code>ab{,}</code>. <code>{,n}</code> is still <code>{0,n}</code>, and without Oniguruma mode <code>{,}</code> is unchanged. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/321">#321</a>)</li>
<li>In Oniguruma mode, a <code>?</code> after an interval with swapped limits, like <code>a{3,2}?</code>, is now another quantifier, as in Oniguruma, so it makes the possessive <code>a{2,3}</code> optional. Before, it made the repeat lazy, so <code>a{3,2}?</code> matched <code>aa</code> in <code>aaa</code> and didn't match an empty string. A <code>?</code>, <code></code> or <code>+</code> after a repeated empty group, like in <code>(?:)</code> or <code>(?:){3,2}?</code>, is now dropped along with it instead of failing to parse. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/322">#322</a>)</li>
<li>In Oniguruma mode, a <code>?</code> after a fixed interval, like <code>a{3}?</code>, is now another quantifier, as in Oniguruma, so <code>a{3}?</code> means <code>(?:a{3})?</code>. Before, it made the repeat lazy, which doesn't change anything for a fixed count, so <code>a{3}?</code> didn't match <code>aa</code> and <code>a{3}??</code> matched <code>aaa</code> instead of an empty string. <code>a{3,3}?</code> is still lazy, and without Oniguruma mode <code>a{3}?</code> is unchanged.</li>
<li>A backref or conditional inside the group it refers to now sees the group's previous capture, as in PCRE and Perl. Before, it saw the new start of the group with the end of its previous capture, so <code>(?:(\1|a)b){2}</code> panicked on <code>abab</code> and <code>^((?(1)b|a))$</code> matched <code>b</code> but not <code>a</code>. (<a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/328">#328</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/5b33048c96318396c88a9abcb81273cd91e2984d"><code>5b33048</code></a> Version 0.20.2</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/4cd67a76c99d09f57d49023882075a5ee87c97e8"><code>4cd67a7</code></a> Merge pull request <a href="https://redirect.github.com/fancy-regex/fancy-regex/issues/333">#333</a> from fancy-regex/fix_ambiguous_quantifier_optimization</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/c5354e1b9d85a2cd48b886fe902e40c06e8c32b0"><code>c5354e1</code></a> Add changelog entry</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/e9d3ac6c1a22c5eb94431c3d115f3f324232e32a"><code>e9d3ac6</code></a> Expand optimize differential test cases to cover
, {2}, and {2,50} quantifiers</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/9728425d0011facdbb85cf8e485a8e59240521a8"><code>9728425</code></a> Add differential test helper proving optimized regex matches unoptimized</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/dd589f7543534ebfe4c93f61d54ab85bf801eb03"><code>dd589f7</code></a> Fix ambiguous concat repeat optimization widening bounded edges</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/a460c32089d11493e205ae085723bc80214e61d3"><code>a460c32</code></a> Version 0.20.1</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/6832ab0694285244f495650c8df83f7f5ad61156"><code>6832ab0</code></a> improve build_seek_pattern doc comments</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/5df1aaa9add314f0518792f07114acea8ee10157"><code>5df1aaa</code></a> Rename misleading contains_word_boundary variable</li>
<li><a href="https://github.com/fancy-regex/fancy-regex/commit/92e724e034d4efaea1b59e3503cc386c5f00218b"><code>92e724e</code></a> fix clippy warning</li>
<li>Additional commits viewable in <a href="https://github.com/fancy-regex/fancy-regex/compare/0.20.0...0.20.2">compare view</a></li>
</ul>
</details>
<br />

Diff: 650 lines (+487 / -163) across 8 files Reviewer: helly25 Review duration: 224m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
0.52
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.388
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #183"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 52% (MEDIUM) · Higher = larger blast radius
52%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 20.5% · Safe to merge
20.5%