Skip to content

chore(deps): update rust crate fancy-regex to 0.19.0 - #23

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/fancy-regex-0.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/fancy-regex-0.x

Conversation

@renovate

@renovate renovate Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
fancy-regex workspace.dependencies minor 0.18.0 → 0.19.0

Release Notes

fancy-regex/fancy-regex (fancy-regex)

v0.19.2

Compare Source

Added
  • Add a leftmost_longest feature (off by default) that adds a method to the RegexBuilder/RegexOptionsBuilder for building a VM which would operate in leftmost-longest match mode instead of the regular leftmost-first mode. Useful for POSIX compliance. (#​281)
Changed
Fixed
  • Fix a panic in capture_names() for a pattern with a zero-repeated named group such as (?<n>a){0} (#​275)
  • Literal bytes were being encoded as utf-8 in Ascii mode, now they match the exact byte literal

v0.19.1

Compare Source

Added
  • Add a perf-dfa-full feature (off by default, mirroring the regex crate) that lets regex-automata eagerly build fully compiled dense DFAs for small patterns, for workloads that compile few regexes and match them very heavily (#​272)
Changed
  • Add VM instruction for case insensitive literals when in Unicode mode, to keep the build cost bounded (#​268) and ensured the toy example graph output remains readable instead of being super verbose (#​269)
  • Compilation performance: the regex-automata dependency no longer enables the dfa-build feature by default. With dfa-build enabled, meta::Regex eagerly determinizes a full dense DFA for every small pattern, which dominated build time of simple class-containing patterns (e.g. \b(extern)\s+(crate) compiled ~4x slower than with the regex crate, which also ships without dfa-build); searches use the lazy DFA instead, with no measurable match-time difference (#​272)
  • Compilation performance: identical delegated fragments within one compile now share a single regex-automata engine instead of each building their own. Alternation-heavy patterns (TextMate grammar lookbehinds especially) often repeat the same fragment many times; on such patterns this removes a large share of build time (#​277)
Fixed
  • The playground didn't show when a literal or backreference was being matched case insensitively in the analysis tree view (#​269)
  • Seek patterns could become very large when recursive backrefs and subroutine calls were inlined, without bringing much benefit (#​270)
  • The optimize_nested_repeats pass could rewrite an optional capture group like (\w+)? into (\w*), causing an unmatched optional group to be reported as an empty match (Some("")) instead of None (#​276)

v0.19.0

Compare Source

Added
  • Add BytesMode and the RegexInput trait so the matching and capture APIs can operate on strings or bytes, and allows to opt out of unicode handling if desired (#​248)
    • Also allows searching within a range without slicing (#​253)
    • Assertions can be overridden at runtime, if the regex builder allow_input_assertion_overrides option was used (#​254)
    • Search can be performed in anchored mode, searching only at the start position specified (#​263)
  • Add experimental seek optimization to only invoke the VM at candidate positions where a match could occur (#​246)
  • Add RegexBuilder::disallow_empty_match_at_eof_after_newline to reject empty matches at the end of the haystack following a trailing newline, to match Oniguruma behavior (#​247)
  • Add RegexSet API for efficiently matching multiple patterns against the same text (#​255)
Changed
  • Case-insensitive backreference comparison of non-ASCII text now uses direct Unicode simple case folding instead of building a regex engine per comparison, which makes patterns like (?i)(\w+)\1 orders of magnitude faster on non-ASCII haystacks. The comparison is now strict fold equality over the captured text's byte-length window: a case-folded prefix of the window no longer counts as a match (previously a substring search could accept one and misalign the match end)
  • Compilation performance: delegated regex-automata engines (including the whole pattern in the easy case) are now built from a directly-constructed Hir instead of a re-serialized pattern string, and RegexSet parses each pattern once for both of its set-wide engines instead of three times. This reduces compile time and peak compile memory, especially for RegexSet and small easy patterns
  • Match performance: the backtracking VM's working memory (saves, backtrack stack, delegate slots) is pooled and reused across runs, making is_match/find/find_iter and RegexSet candidate verification allocation-free per call; RegexSet::find_input no longer allocates at failed candidate positions. Short and repeated matches improve substantially (up to ~30% for small patterns, ~10% for find_iter over many matches); single very long backtracking runs, where per-run setup is fully amortized anyway, can be a few percent slower
  • Matches, CaptureMatches, Captures, and SubCaptureMatches are now generic over RegexInput, which is a breaking change for code that named these types explicitly (#​248)
  • Patterns no longer force Unicode mode during parsing, and inline (?u) / (?-u) flags are accepted when they agree with the builder configuration
Fixed
  • Fix bug whereby inline flags were not overriding the builder options (#​247)
  • Fix bug whereby \G optimizations were applying where they shouldn't, giving wrong results (#​256)
  • Support Oniguruma quantifier parsing rules, whereby swapped ordering causes possessiveness, + only causes possessiveness after ?, * or + (#​258)
Upgrade guide

If you previously stored i.e. Captures, you would need to change the type to Captures<str> to get the code to compile.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants