Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 20, 2025

Bumps regex from 1.11.1 to 1.12.2.

Changelog

Sourced from regex's changelog.

1.12.2 (2025-10-13)

This release fixes a cargo doc breakage on nightly when --cfg docsrs is enabled. This caused documentation to fail to build on docs.rs.

Bug fixes:

1.12.1 (2025-10-10)

This release makes a bug fix in the new regex::Captures::get_match API introduced in 1.12.0. There was an oversight with the lifetime parameter for the Match returned. This is technically a breaking change, but given that it was caught almost immediately and I've yanked the 1.12.0 release, I think this is fine.

1.12.0 (2025-10-10)

This release contains a smattering of bug fixes, a fix for excessive memory consumption in some cases and a new regex::Captures::get_match API.

Improvements:

Bug fixes:

1.11.3 (2025-09-25)

This is a small patch release with an improvement in memory usage in some cases.

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [regex](https://github.com/rust-lang/regex) from 1.11.1 to 1.12.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](rust-lang/regex@1.11.1...1.12.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-version: 1.12.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 20, 2025

Labels

The following labels could not be found: rust. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@fossabot
Copy link

fossabot bot commented Oct 20, 2025

fossabot is Thinking

@fossabot
Copy link

fossabot bot commented Oct 20, 2025

✓ Safe to upgrade

I recommend merging this upgrade because it includes two critical security fixes for denial-of-service vulnerabilities in the regex compiler without introducing any breaking changes to the APIs used in this project. The codebase uses only stable APIs (Regex::new and replace_all) for sanitizing error messages in the security module, and these methods remain unchanged. The upgrade from the previous minor version includes bug fixes and performance improvements, with successful adoption by major projects like Apache Arrow demonstrating production stability.

What we checked

  • Regex dependency declaration using semantic versioning '1' allows this minor version upgrade [1]
  • Uses Regex::new() API which is stable and unchanged in this upgrade [2]
  • Uses replace_all() API which is stable and unchanged in this upgrade [3]
  • Security fix: Patches regex compiler DoS vulnerability where empty sub-expressions could bypass size limits, potentially allowing denial-of-service attacks [4]
  • Production validation: Apache Arrow successfully upgraded to regex 1.12.2, demonstrating stability in large-scale projects [5]

Dependency Usage

The regex dependency is used exclusively in the security module (security.rs) to sanitize error messages and prevent information leakage by detecting and redacting sensitive patterns such as file paths, IP addresses, credentials, database connection strings, and environment variables. This security hardening feature protects against accidental exposure of sensitive system information in error messages displayed to users, supporting the application's defense-in-depth strategy for secure file system operations.

Changes

The regex crate update includes two critical security fixes for denial-of-service vulnerabilities in the regex compiler when handling untrusted patterns, along with 29 breaking changes including the removal of the thread_local and lazy_static dependencies, renamed API methods (quote to escape, RegexBuilder::compile to build), and a new minimum Rust requirement. Additionally, 270 bug fixes address numerous matching bugs with word boundaries, capture groups, empty sub-expressions, and Unicode character classes that could cause incorrect matches or panics.

  • regex-syntax released as version 0.8.0 with breaking changes (v1.11.1, changelog)
  • The allow_invalid_utf8 option in regex-syntax has been renamed (v1.11.1, changelog)
  • BUG #680: Fixes a bug where [[:alnum:][:^ascii:]] dropped [:alnum:] from the class. (v1.11.1, changelog)
View 610 more changes
  • Fixed compilation on nightly Rust when the unstable pattern crate feature is enabled (v1.11.1, changelog)
  • BUG #1231: (v1.11.1, changelog)
  • Fix the Pattern trait implementation due to nightly API breakage (v1.11.1, changelog)
  • Updated Unicode Character Database to version 16 (v1.11.1, changelog)
  • FEATURE #1228: (v1.11.1, changelog)
  • Add new regex::SetMatches::matched_all method (v1.11.1, changelog)
  • FEATURE #1229: (v1.11.1, changelog)
  • Update Unicode Character Database (UCD) to version 16 (v1.11.1, changelog)
  • Fixed the unstable crate feature to properly enable std::str::Pattern trait integration (v1.11.1, changelog)
  • BUG #1219: (v1.11.1, changelog)
  • BUG #1203: (v1.11.1, changelog)
  • Escape invalid UTF-8 in the Debug impl of regex::bytes::Match (v1.11.1, changelog)
  • BUG #1169: (v1.11.1, changelog)
  • Fixed a bug with compiling a reverse NFA automaton in regex-automata (v1.11.1, changelog)
  • BUG #1178: (v1.11.1, changelog)
  • Clarifies documentation for Cow::Borrowed return value from replace APIs to indicate equivalence with input (v1.11.1, changelog)
  • Fixed feature configuration of optional dependencies (v1.11.1, changelog)
  • Fixed unsound use of bounds check elision (v1.11.1, changelog)
  • BUG #1147: (v1.11.1, changelog)
  • Set default-features=false for the memchr dependency (v1.11.1, changelog)
  • Set default-features=false for the aho-corasick dependency (v1.11.1, changelog)
  • BUG #1154: (v1.11.1, changelog)
  • Fix unsound bounds check elision (v1.11.1, changelog)
  • Fixed a search regression where incorrect matches could be reported (v1.11.1, changelog)
  • BUG #1110: (v1.11.1, changelog)
  • Reverted broadening of reverse suffix literal optimization that was introduced in version 1.10.1 (v1.11.1, changelog)
  • Increased the number of valid patterns supported (v1.11.1, changelog)
  • Broadened literal optimizations (v1.11.1, changelog)
  • FEATURE 04f5d7be: (v1.11.1, changelog)
  • Loosen ASCII-compatible rules to allow regexes with non-ASCII characters in non-Unicode mode (e.g., (?-u:☃)) (v1.11.1, changelog)
  • PERF 8a8d599f: (v1.11.1, changelog)
  • Expanded the reverse suffix optimization to apply in more cases (v1.11.1, changelog)
  • Added support for start word boundary assertion \< (v1.11.1, changelog)
  • Raised minimum supported Rust version to 1.65 (v1.11.1, changelog)
  • \< or \b{start}: a Unicode start-of-word boundary (\W|\A on the left, (v1.11.1, changelog)
  • \> or \b{end}: a Unicode end-of-word boundary (\w on the left, \W|\z (v1.11.1, changelog)
  • \b{start-half}: half of a Unicode start-of-word boundary (\W|\A on the (v1.11.1, changelog)
  • \b{end-half}: half of a Unicode end-of-word boundary (\W|\z on the (v1.11.1, changelog)
  • Added support for \< and \> GNU extensions to POSIX regexes in the regex crate (v1.11.1, changelog)
  • Added \b{start} assertion as an alias for \< (v1.11.1, changelog)
  • Added \b{start-half} assertion for word boundary matching (v1.11.1, changelog)
  • Implemented support for more flexible word boundary definitions in grep programs (v1.11.1, changelog)
  • FEATURE #469: (v1.11.1, changelog)
  • Add support for \< word boundary assertion (v1.11.1, changelog)
  • FEATURE(regex-automata) #1031: (v1.11.1, changelog)
  • DFAs now have a start_state method that doesn't use an Input (v1.11.1, changelog)
  • PERF #1051: (v1.11.1, changelog)
  • Unicode character class operations have been optimized in regex-syntax (v1.11.1, changelog)
  • PERF #1090: (v1.11.1, changelog)
  • Reduced memory usage for patterns containing lots of literal characters (v1.11.1, changelog)
  • BUG #1046: (v1.11.1, changelog)
  • Fix incorrect match spans when using Unicode word boundary with non-ASCII strings (v1.11.1, changelog)
  • BUG(regex-syntax) #1047: (v1.11.1, changelog)
  • Fix panics that can occur in Ast->Hir translation (v1.11.1, changelog)
  • Remove API guarantees that connect the u flag with a specific HIR representation (v1.11.1, changelog)
  • Look enum has new variants to support word boundary assertions (v1.11.1, changelog)
  • LookSet type now uses u32 instead of u16 to represent a bitset of look-around assertions (v1.11.1, changelog)
  • New word boundary assertions have been added to regex-automata (v1.11.1, changelog)
  • New word boundary assertions added to support regex-automata (v1.11.1, changelog)
  • Ast type modified to reduce heap usage in some cases (v1.11.1, changelog)
  • Direct users of Ast type may require minor code modifications (v1.11.1, changelog)
  • Users migrating from regex-syntax 0.7 to 0.8 can do so without code changes (if not using Ast type directly) (v1.11.1, changelog)
  • Fixed a panic that occurs when the default regex size limit is increased to a large number (v1.11.1, changelog)
  • BUG aa4e4c71: (v1.11.1, changelog)
  • Fixed a bug in the bounded backtracker where computing the maximum haystack length could result in underflow, causing a panic during search due to a broken invariant. (v1.11.1, changelog)
  • Fixed a performance bug that occurs when sharing a regex across multiple threads (v1.11.1, changelog)
  • Changed free-list to be sharded across threads (v1.11.1, changelog)
  • Ensured each sharded mutex occupies a single cache line to mitigate false sharing (v1.11.1, changelog)
  • BUG #934: (v1.11.1, changelog)
  • Fixed a performance bug where high contention on a single regex caused massive slowdowns (v1.11.1, changelog)
  • Fixed bug in RegexSet::is_match(..) that could incorrectly return false when RegexSet::matches(..).matched_any() returns true (v1.11.1, changelog)
  • BUG #1070: (v1.11.1, changelog)
  • Fixed a bug where a prefilter was incorrectly configured for a RegexSet (v1.11.1, changelog)
  • Fixed a bug where some searches could result in incorrect match offsets being reported (v1.11.1, changelog)
  • BUG #1060: (v1.11.1, changelog)
  • Fix bug with reverse inner literal optimization reporting incorrect match offsets (v1.11.1, changelog)
  • Fixed memory usage regression in RegexSet that caused excessive heap allocation (one to two orders of magnitude more than pre-1.9.0 versions) (v1.11.1, changelog)
  • BUG #1059: (v1.11.1, changelog)
  • Fixed a memory usage regression when using a RegexSet (v1.11.1, changelog)
  • Reverted internal engine allocation strategy from aggressive to on-demand to fix memory usage regression introduced in regex 1.9 (v1.11.1, changelog)
  • BUG #1027: (v1.11.1, changelog)
  • Change the allocation strategy for the backtracker to be less aggressive (v1.11.1, changelog)
  • Internal performance improvements to regex searches (v1.11.1, changelog)
  • API additions (multiple, unspecified) (v1.11.1, changelog)
  • A new Captures::extract method for quickly accessing the substrings (v1.11.1, changelog)
  • A new inline flag, R, which enables CRLF mode. This makes . match any (v1.11.1, changelog)
  • (?m:^) now matches after both \r and \n in multiline mode (v1.11.1, changelog)
  • (?m:^) and (?m:$) never match between a \r and \n pair (v1.11.1, changelog)
  • RegexBuilder::line_terminator was added to further customize the line (v1.11.1, changelog)
  • Allow the terminator used by (?m:^) and (?m:$) to be any arbitrary byte (v1.11.1, changelog)
  • The std Cargo feature is now actually optional. That is, the regex crate (v1.11.1, changelog)
  • Because regex 1.9 may make binary size and compile times even worse, a (v1.11.1, changelog)
  • New experimental crate regex-lite has been published (v1.11.1, changelog)
  • regex-lite prioritizes binary size over functionality and performance (v1.11.1, changelog)
  • regex-lite prioritizes compile times over functionality and performance (v1.11.1, changelog)
  • regex-lite omits Unicode support (v1.11.1, changelog)
  • regex-lite shares no code with the regex crate (v1.11.1, changelog)
  • FEATURE #244: (v1.11.1, changelog)
  • Added R flag to enable CRLF mode in regex patterns (v1.11.1, changelog)
  • (?mR:$) now matches just before \r\n when CRLF mode is enabled (v1.11.1, changelog)
  • FEATURE #259: (v1.11.1, changelog)
  • FEATURE #476: (v1.11.1, changelog)
  • std is now an optional feature (v1.11.1, changelog)
  • regex can now be used with only alloc (without requiring std) (v1.11.1, changelog)
  • FEATURE #644: (v1.11.1, changelog)
  • RegexBuilder::line_terminator method added to configure the behavior of (?m:^) and (?m:$) anchors (v1.11.1, changelog)
  • FEATURE #675: (v1.11.1, changelog)
  • Anchored search APIs are now available in regex-automata 0.3 (v1.11.1, changelog)
  • FEATURE #824: (v1.11.1, changelog)
  • Add new Captures::extract method for easier capture group access (v1.11.1, changelog)
  • FEATURE #961: (v1.11.1, changelog)
  • Add regex-lite crate with smaller binary sizes (v1.11.1, changelog)
  • Add regex-lite crate with faster compile times (v1.11.1, changelog)
  • FEATURE #1022: (v1.11.1, changelog)
  • Add TryFrom implementation for the Regex type (v1.11.1, changelog)
  • PERF #68: (v1.11.1, changelog)
  • Added a one-pass DFA engine for faster capture group matching (v1.11.1, changelog)
  • PERF #510: (v1.11.1, changelog)
  • Inner literals are now used to accelerate regex searches (v1.11.1, changelog)
  • Patterns like \w+@\w+ now scan for the literal @ character to improve performance (v1.11.1, changelog)
  • PERF #787, (v1.11.1, changelog)
  • Literal optimizations now apply to regexes of the form \b(foo|bar|quux)\b (v1.11.1, changelog)
  • BUG #429: (v1.11.1, changelog)
  • Fix matching bugs related to \B (word boundary assertion) (v1.11.1, changelog)
  • Fix inconsistencies across internal regex engines (v1.11.1, changelog)
  • BUG #517: (v1.11.1, changelog)
  • Fixed matching bug with capture groups (v1.11.1, changelog)
  • BUG #579: (v1.11.1, changelog)
  • Fix matching bug with word boundaries (v1.11.1, changelog)
  • BUG #779: (v1.11.1, changelog)
  • Fixed bug where regexes like (re)+ were not equivalent to (re)(re)* (v1.11.1, changelog)
  • BUG #850: (v1.11.1, changelog)
  • Fix matching bug inconsistency between NFA and DFA engines (v1.11.1, changelog)
  • BUG #921: (v1.11.1, changelog)
  • Fix matching bug where literal extraction got confused by $ (v1.11.1, changelog)
  • BUG #976: (v1.11.1, changelog)
  • Add documentation to replacement routines about dealing with fallibility (v1.11.1, changelog)
  • BUG #1002: (v1.11.1, changelog)
  • Use corpus rejection in fuzz testing (v1.11.1, changelog)
  • Fixed a bug where (?-u:\B) was incorrectly allowed in Unicode regexes (v1.11.1, changelog)
  • Prevented match offsets from being reported between code units of a single UTF-8 encoded codepoint (v1.11.1, changelog)
  • Fixed panicking that occurred when using split codepoint match offsets to slice a &str (v1.11.1, changelog)
  • Added code to prevent (?-u:\B) from compiling in Unicode regexes in regex 1.8.4, restoring pre-1.8 behavior (v1.11.1, changelog)
  • Regex::new(r"(?-u:\B)") now returns an error instead of compiling successfully (v1.11.1, changelog)
  • bytes::Regex continues to allow (?-u:\B) compilation (v1.11.1, changelog)
  • BUG #1006: (v1.11.1, changelog)
  • Prevent match offsets from splitting a codepoint in &str when using (?-u:\B) in Unicode regexes (v1.11.1, changelog)
  • Fixed bug where regex would report a match at every position incorrectly in a small subset of regexes (v1.11.1, changelog)
  • Fixed issue affecting alternation of simple literals with particular properties (v1.11.1, changelog)
  • BUG #999: (v1.11.1, changelog)
  • Fixed a bug where matches at every position were being erroneously reported (v1.11.1, changelog)
  • Fixed bug where regex compilation could panic in debug mode for regexes with large counted repetitions (v1.11.1, changelog)
  • Fixed integer overflow in regex compilation when processing patterns like a{2147483516}{2147483416}{5} (v1.11.1, changelog)
  • BUG #995: (v1.11.1, changelog)
  • Fix a bug where regex compilation with large counted repetitions could panic. (v1.11.1, changelog)
  • Fixed bug where regex match could be reported when none was found (v1.11.1, changelog)
  • Fixed bug occurring when pattern contains literal prefixes that can be extracted and an optional word boundary in the prefix (v1.11.1, changelog)
  • BUG #981: (v1.11.1, changelog)
  • Fixed a bug where word boundary interactions with prefix literal optimizations caused false positive matches (v1.11.1, changelog)
  • Increases the MSRV to Rust 1.60.0, which was released about 1 year ago. (v1.11.1, changelog)
  • Upgrades its dependency on aho-corasick to the recently released 1.0 (v1.11.1, changelog)
  • Upgrades its dependency on regex-syntax to the simultaneously released (v1.11.1, changelog)
  • Rewrote literal extraction code in regex-syntax (v1.11.1, changelog)
  • Simplified high-level intermediate representation (HIR) (v1.11.1, changelog)
  • Rewrite the entire regex engine from scratch (v1.11.1, changelog)
  • Integrate regex-automata repository into the regex repository (v1.11.1, changelog)
  • Convert the regex crate into an API shim layer on top of regex-automata's API (v1.11.1, changelog)
  • FEATURE #501: (v1.11.1, changelog)
  • Permit escaping of many more ASCII characters (any except [0-9A-Za-z<>]) (v1.11.1, changelog)
  • Add new routine is_escapeable_character to regex-syntax crate to query whether a character is escapable (v1.11.1, changelog)
  • FEATURE #547: (v1.11.1, changelog)
  • Add Regex::captures_at method to the API (v1.11.1, changelog)
  • FEATURE #595: (v1.11.1, changelog)
  • Capture group names are now Unicode-aware (v1.11.1, changelog)
  • Capture group names can now begin with _ or any "alphabetic" codepoint (v1.11.1, changelog)
  • Capture group names can contain alphanumeric codepoints after the first character (v1.11.1, changelog)
  • Capture group names can now contain . character (v1.11.1, changelog)
  • FEATURE #810: (v1.11.1, changelog)
  • Add Match::is_empty API (v1.11.1, changelog)
  • Add Match::len API (v1.11.1, changelog)
  • FEATURE #905: (v1.11.1, changelog)
  • Add impl Default for RegexSet with the default being the empty set (v1.11.1, changelog)
  • FEATURE #908: (v1.11.1, changelog)
  • Added new method Regex::static_captures_len that returns the number of capture groups in a pattern when every possible match contains the same number of matching groups (v1.11.1, changelog)
  • FEATURE #955: (v1.11.1, changelog)
  • Named captures now support the (?<name>re) syntax in addition to the existing (?P<name>re) syntax (v1.11.1, changelog)
  • regex-syntax now supports empty character classes. (v1.11.1, changelog)
  • regex-syntax now has an optional std feature. (This will come (v1.11.1, changelog)
  • The Hir type in regex-syntax has had a number of simplifications (v1.11.1, changelog)
  • regex-syntax has support for a new R flag for enabling CRLF (v1.11.1, changelog)
  • regex-syntax now has proper support for "regex that never (v1.11.1, changelog)
  • The hir::literal module of regex-syntax has been completely (v1.11.1, changelog)
  • Added more documentation to regex (v1.11.1, changelog)
  • Added more examples to regex (v1.11.1, changelog)
  • Added more advice to regex (v1.11.1, changelog)
  • Re-worked regex (v1.11.1, changelog)
  • The default encoding has been changed to utf8 (v1.11.1, changelog)
  • The meaning of the boolean parameter has been reversed/flipped (v1.11.1, changelog)
  • PERF: The upgrade to aho-corasick 1.0 may improve performance in some (v1.11.1, changelog)
  • BUG #514: (v1.11.1, changelog)
  • Improved Debug implementation for Match to avoid displaying the entire haystack (v1.11.1, changelog)
  • BUGS #516, (v1.11.1, changelog)
  • Fix issues with printing Hir values as regex patterns (v1.11.1, changelog)
  • BUG #610: (v1.11.1, changelog)
  • Add explicit example of foo|bar in the regex syntax docs (v1.11.1, changelog)
  • BUG #625: (v1.11.1, changelog)
  • Clarified documentation for SetMatches::len to indicate it does not refer to the number of matches in the set (v1.11.1, changelog)
  • BUG #660: (v1.11.1, changelog)
  • Clarify "verbose mode" in regex syntax documentation (v1.11.1, changelog)
  • BUG #738, (v1.11.1, changelog)
  • Fix CaptureLocations::get to prevent panics (v1.11.1, changelog)
  • BUG #747: (v1.11.1, changelog)
  • Clarify documentation for Regex::shortest_match (v1.11.1, changelog)
  • BUG #835: (v1.11.1, changelog)
  • Fix \p{Sc} to be equivalent to \p{Currency_Symbol} (v1.11.1, changelog)
  • BUG #846: (v1.11.1, changelog)
  • Add clarifying documentation to the CompiledTooBig error variant (v1.11.1, changelog)
  • BUG #854: (v1.11.1, changelog)
  • Clarify documentation for regex::Regex to indicate that searches are performed as if the haystack is a sequence of Unicode scalar values (v1.11.1, changelog)
  • BUG #884: (v1.11.1, changelog)
  • Replace __Nonexhaustive variants with #[non_exhaustive] attribute (v1.11.1, changelog)
  • BUG #893: (v1.11.1, changelog)
  • Optimize case folding performance to handle pathological cases more efficiently (v1.11.1, changelog)
  • BUG #895: (v1.11.1, changelog)
  • Reject (?-u:\W) pattern in regex::Regex APIs (v1.11.1, changelog)
  • BUG #942: (v1.11.1, changelog)
  • Add a missing void keyword to C API function signatures to indicate "no parameters" (v1.11.1, changelog)
  • BUG #965: (v1.11.1, changelog)
  • Fix \p{Lc} to be equivalent to \p{Cased_Letter} (v1.11.1, changelog)
  • BUG #975: (v1.11.1, changelog)
  • Clarify documentation for \pX syntax. (v1.11.1, changelog)
  • Fixed a bug in Regex::shortest_match_at that could cause it to panic with a valid offset (v1.11.1, changelog)
  • BUG #969: Fix a bug in how the reverse DFA was called for Regex::shortest_match_at. (v1.11.1, changelog)
  • Fixed a failing test on FreeBSD (v1.11.1, changelog)
  • BUG #967: Fix "no stack overflow" test which can fail due to the small stack size. (v1.11.1, changelog)
  • PERF #930: Optimize replacen. This also applies to replace, but not replace_all. (v1.11.1, changelog)
  • BUG #945: Maybe fix rustdoc rendering by just bumping a new release? (v1.11.1, changelog)
  • Upgrade to Unicode 15 (v1.11.1, changelog)
  • FEATURE #832: Upgrade to Unicode 15. (v1.11.1, changelog)
  • Upgrade to Unicode 14 (v1.11.1, changelog)
  • FEATURE #832: Clarify that Captures::len includes all groups, not just matching groups. (v1.11.1, changelog)
  • FEATURE #857: Add an ExactSizeIterator impl for SubCaptureMatches. (v1.11.1, changelog)
  • FEATURE #861: Improve RegexSet documentation examples. (v1.11.1, changelog)
  • FEATURE #877: Upgrade to Unicode 14. (v1.11.1, changelog)
  • BUG #792: Fix error message rendering bug. (v1.11.1, changelog)
  • Fixed bug where non-greedy ? operator produced incorrect matches (v1.11.1, changelog)
  • BUG #859: Fixes a bug where Hir::is_match_empty returned false for \b. (v1.11.1, changelog)
  • BUG #862: Fixes a bug where 'ab??' matches 'ab' instead of 'a' in 'ab'. (v1.11.1, changelog)
  • Fixed a security bug in the regex compiler that could permit denial-of-service attacks when compiling untrusted regex patterns (v1.11.1, changelog)
  • SECURITY #GHSA-m5pq-gvj9-9vr8: Fixes a bug in the regex compiler where empty sub-expressions subverted the existing mitigations in place to enforce a size limit on compiled regexes. The Rust Security Response WG published an advisory about this: https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw (v1.11.1, changelog)
  • Fixed compilation failure when the pattern feature is enabled on nightly Rust (v1.11.1, changelog)
  • Updated CI to test the pattern feature case (v1.11.1, changelog)
  • BUG #772: Fix build when pattern feature is enabled. (v1.11.1, changelog)
  • Fixed a bug when building regex with only the unicode-perl feature (v1.11.1, changelog)
  • Fixed CI configuration to properly fail the overall build on failed compilation when using the unicode-perl feature (v1.11.1, changelog)
  • BUG #769: Fix build in regex-syntax when only the unicode-perl feature is enabled. (v1.11.1, changelog)
  • Fixed performance bug where lazy DFA would stop searching unnecessarily when Unicode word boundaries are used, causing fallback to slower engine (v1.11.1, changelog)
  • Fixed a bug originally reported in ripgrep#1860 (via PR #768) (v1.11.1, changelog)
  • Fixed compilation error when the perf-literal feature is not enabled (v1.11.1, changelog)
  • Update codebase to Rust 2018 edition (v1.11.1, changelog)
  • Bump minimum supported Rust version (MSRV) to Rust 1.41 (from Rust 1.28) (v1.11.1, changelog)
  • Replaced crate's own substring search algorithms with memmem implementation from memchr crate (v1.11.1, changelog)
  • Changed performance profile of some regexes (may improve or slightly worsen) (v1.11.1, changelog)
  • Fixed compiler's size check for heap memory usage by Unicode character classes (v1.11.1, changelog)
  • Compiler now accounts for heap usage of Unicode character classes in regex compilation (v1.11.1, changelog)
  • BUG OSS-fuzz#33579: Some regexes can use more heap memory than one would expect. (v1.11.1, changelog)
  • Fixed regression in Regex size that increased from 552 bytes to 856 bytes in version 1.4.4 (v1.11.1, changelog)
  • Reduced Regex size to 16 bytes in this release (v1.11.1, changelog)
  • Resolved stack overflow issues in programs caused by the increased Regex size in version 1.4.4 (v1.11.1, changelog)
  • BUG #750: Fixes stack overflows seemingly caused by a large Regex size by decreasing its size. (v1.11.1, changelog)
  • Dropped thread_local dependency (v1.11.1, changelog)
  • Dropped lazy_static dependency (removed via transitivity) (v1.11.1, changelog)
  • Bug fixes included in patch release (v1.11.1, changelog)
  • BUG #362: Memory leaks caused by an internal caching strategy should now be fixed. (v1.11.1, changelog)
  • BUG #576: All regex types now implement UnwindSafe and RefUnwindSafe. (v1.11.1, changelog)
  • BUG #728: Add missing Replacer impls for Vec<u8>, String, Cow, etc. (v1.11.1, changelog)
  • Add missing standard trait implementations for types in the public API (v1.11.1, changelog)
  • BUG #734: Add FusedIterator and ExactSizeIterator impls to iterator types. (v1.11.1, changelog)
  • BUG #735: Add missing Debug impls to public API types. (v1.11.1, changelog)
  • Ban \P{any} pattern to prevent empty character classes (v1.11.1, changelog)
  • BUG #722: Ban \P{any} to avoid a panic in the regex compiler. Found by OSS-Fuzz. (v1.11.1, changelog)
  • Fixed \p{cf} regex pattern to work correctly instead of reporting "property not found" (v1.11.1, changelog)
  • Enabled cf abbreviation for the Format general category in regex patterns (v1.11.1, changelog)
  • BUG #719: Fixes bug that prevented \p{cf} from working. (v1.11.1, changelog)
  • Minor documentation fixes added (v1.11.1, changelog)
  • Minor API additions made (v1.11.1, changelog)
  • MSRV (Minimum Supported Rust Version) remains at Rust 1.28 (v1.11.1, changelog)
  • MSRV planned to increase to at least Rust 1.41.1 in the future (v1.11.1, changelog)
  • Added support for OSS-Fuzz (v1.11.1, changelog)
  • FEATURE #649: Support [, ] and . in capture group names. (v1.11.1, changelog)
  • FEATURE #687: Add is_empty predicate to RegexSet. (v1.11.1, changelog)
  • FEATURE #689: Implement Clone for SubCaptureMatches. (v1.11.1, changelog)
  • FEATURE #715: Add empty constructor to RegexSet for convenience. (v1.11.1, changelog)
  • BUG #694: Fix doc example for Replacer::replace_append. (v1.11.1, changelog)
  • BUG #698: Clarify docs for s flag when using a bytes::Regex. (v1.11.1, changelog)
  • BUG #711: Clarify is_match docs to indicate that it can match anywhere in string. (v1.11.1, changelog)
  • BUG #685: Remove use of doc_comment crate, which cannot be used before Rust 1.43. (v1.11.1, changelog)
  • Added support for empty-subexpressions in regexes (e.g., b| is now allowed) (v1.11.1, changelog)
  • Fixed multiple bugs related to empty-subexpression handling in regexes (v1.11.1, changelog)
  • BUG #523: Add note to documentation that spaces can be escaped in x mode. (v1.11.1, changelog)
  • BUG #524: Add support for empty sub-expressions, including empty alternations. (v1.11.1, changelog)
  • BUG #659: Fix match bug caused by an empty sub-expression miscompilation. (v1.11.1, changelog)
  • Fixed regex crate feature forwarding to regex-syntax to reduce unnecessary recompilations (v1.11.1, changelog)
  • BUG #665: Fix feature forwarding to regex-syntax. (v1.11.1, changelog)
  • Performance improvement (~30%) when compiling large regular expressions (v1.11.1, changelog)
  • PERF #657: Improvement performance of compiling large regular expressions. (v1.11.1, changelog)
  • Update Unicode support to version 13 (v1.11.1, changelog)
  • FEATURE #653: Update regex-syntax to Unicode 13. (v1.11.1, changelog)
  • Fixed a bug where flags in regex patterns were not properly scoped, causing characters outside the flag group to incorrectly inherit the flag's behavior (e.g., ((?i)a)b) now correctly does not match aB) (v1.11.1, changelog)
  • BUG #640: Fix bug related to the scoping of flags in a regex. (v1.11.1, changelog)
  • Upgrade thread_local dependency from version 0.3 to version 1.0 (v1.11.1, changelog)
  • FEATURE #631: Add a Match::range method an a From<Match> for Range impl. (v1.11.1, changelog)
  • BUG #521: Corrects /-/.splitn("a", 2) to return ["a"] instead of ["a", ""]. (v1.11.1, changelog)
  • BUG #594: Improve error reporting when writing \p\. (v1.11.1, changelog)
  • BUG #627: Corrects /-/.split("a-") to return ["a", ""] instead of ["a"]. (v1.11.1, changelog)
  • BUG #633: Squash deprecation warnings for the std::error::Error::description method. (v1.11.1, changelog)
  • Added multiple new crate features to reduce regex binary size (v1.11.1, changelog)
  • Users can disable Unicode support as a trade-off for smaller size (v1.11.1, changelog)
  • Users can sacrifice runtime performance as a trade-off for smaller size (v1.11.1, changelog)
  • Dependency tree reduced to 1 crate (regex-syntax) when all optional features are disabled (v1.11.1, changelog)
  • Added documentation for new crate features (v1.11.1, changelog)
  • FEATURE #474: The use_std feature has been deprecated in favor of the std feature. The use_std feature will be removed in regex 2. Until then, use_std will remain as an alias for the std feature. (v1.11.1, changelog)
  • FEATURE #583: Add a substantial number of crate features shrinking regex. (v1.11.1, changelog)
  • This repository is now using rustfmt. (v1.11.1, changelog)
  • License headers have been removed from all files, in following suit with the Rust project. (v1.11.1, changelog)
  • Teddy has been removed from the regex crate, and is now part of the aho-corasick crate. See aho-corasick's new packed submodule for details. (v1.11.1, changelog)
  • The utf8-ranges crate has been deprecated, with its functionality moving into the utf8 sub-module of regex-syntax. (v1.11.1, changelog)
  • The ucd-util dependency has been dropped, in favor of implementing what little we need inside of regex-syntax itself. (v1.11.1, changelog)
  • Join the regex crate with the bstr crate to provide more sophisticated substring search algorithms (v1.11.1, changelog)
  • Delete existing substring search code in regex (to be replaced by bstr) (v1.11.1, changelog)
  • Join the regex crate with the regex-automata crate to provide ahead-of-time compiled DFAs (v1.11.1, changelog)
  • Add support for inexpensive ahead-of-time compiled DFAs in regex-automata (v1.11.1, changelog)
  • Update regex's minimum supported Rust version to 1.28 (v1.11.1, changelog)
  • Update regex's Unicode data tables to 12.1.0 (v1.11.1, changelog)
  • Fixed a bug that caused regex's tests to fail due to a dependency on an unreleased behavior in regex-syntax (v1.11.1, changelog)
  • BUG #593: Move an integration-style test on error messages into regex-syntax. (v1.11.1, changelog)
  • Fixed undefined behavior in SIMD code (v1.11.1, changelog)
  • Performed internal refactorings (v1.11.1, changelog)
  • BUG #545: Improves error messages when a repetition operator is used without a number. (v1.11.1, changelog)
  • BUG #588: Removes use of a repr(Rust) union used for type punning in the Teddy matcher. (v1.11.1, changelog)
  • BUG #591: Update docs for running benchmarks and improve failure modes. (v1.11.1, changelog)
  • Fixed a regression from bug fix #557 that could cause the regex engine to enter an infinite loop (v1.11.1, changelog)
  • Fixed bug in regex's dependency specification where Cargo.toml did not correctly specify the required newer version of regex-syntax (v1.11.1, changelog)
  • Re-enabled minimal version check (previously disabled due to incorrect dependency specifications in the rand crate) (v1.11.1, changelog)
  • BUG #570: Fix regex-syntax minimal version. (v1.11.1, changelog)
  • Fixed backwards compatibility regression where Regex was no longer UnwindSafe (v1.11.1, changelog)
  • Fixed UnwindSafe issue caused by aho-corasick 0.7 upgrade where AhoCorasick type was not UnwindSafe (v1.11.1, changelog)
  • Updated aho-corasick dependency to a version with UnwindSafe support (v1.11.1, changelog)
  • BUG #568: Fix an API regression where Regex was no longer UnwindSafe. (v1.11.1, changelog)
  • Fixed bugs in regex functionality (v1.11.1, changelog)
  • Added performance improvement for simple alternation of literals in regex patterns (v1.11.1, changelog)
  • OPT #566: Upgrades aho-corasick to 0.7 and uses it for foo|bar|...|quux regexes. (v1.11.1, changelog)
  • BUG #527: Fix a bug where the parser would panic on patterns like ((?x)). (v1.11.1, changelog)
  • BUG #557: Fix a bug where captures could lead to an incorrect match. (v1.11.1, changelog)
  • Fixed a bug in the fix introduced in version 1.1.1 (v1.11.1, changelog)
  • BUG edf45e6f: Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release. (v1.11.1, changelog)
  • Fixed a bug caused by literal optimizations (v1.11.1, changelog)
  • BUG 661bf53d: Fixes a bug in the reverse suffix literal optimization. This was originally reported against ripgrep. (v1.11.1, changelog)
  • Increase minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0) (v1.11.1, changelog)
  • Bump minor version number in accordance with MSRV policy (v1.11.1, changelog)
  • OPT #511, OPT #540: Improve lazy DFA construction for large regex sets. (v1.11.1, changelog)
  • FEATURE #538: Add Emoji and "break" Unicode properties. See UNICODE.md. (v1.11.1, changelog)
  • BUG #530: Add Unicode license (for data tables). (v1.11.1, changelog)
  • Various typo/doc fixups. (v1.11.1, changelog)
  • OPT #513: Improve performance of compiling large Unicode classes by 8-10%. (v1.11.1, changelog)
  • BUG #533: Fix definition of [[:blank:]] class that regressed in regex-syntax 0.5. (v1.11.1, changelog)
  • FEATURE #509: Generalize impls of the Replacer trait. (v1.11.1, changelog)
  • Bumped quickcheck dependency (v1.11.1, changelog)
  • BUG #504: Fix for Cargo's "minimal version" support. (v1.11.1, changelog)
  • BUG 1e39165f: Fix doc examples for byte regexes. (v1.11.1, changelog)
  • Expose new lower level APIs on Regex for amortizing allocation (v1.11.1, changelog)
  • Expose new lower level APIs on Regex for controlling search location in a more granular way (v1.11.1, changelog)
  • FEATURE #493: Add a few lower level APIs for amortizing allocation and more fine-grained searching. (v1.11.1, changelog)
  • BUG 3981d2ad: Correct outdated documentation on RegexBuilder::dot_matches_new_line. (v1.11.1, changelog)
  • BUG 7ebe4ae0: Correct outdated documentation on Parser::allow_invalid_utf8 in the regex-syntax crate. (v1.11.1, changelog)
  • BUG 24c7770b: Fix a bug in the HIR printer where it wouldn't correctly escape meta characters in character classes. (v1.11.1, changelog)
  • Upgrade Unicode tables to Unicode 11 (v1.11.1, changelog)
  • Enable SIMD optimizations automatically on Rust stable (1.27 or newer) (v1.11.1, changelog)
  • FEATURE #486: Implement size_hint on RegexSet match iterators. (v1.11.1, changelog)
  • FEATURE #488: Update Unicode tables for Unicode 11. (v1.11.1, changelog)
  • FEATURE #490: SIMD optimizations are now enabled automatically in Rust stable, for versions 1.27 and up. No compilation flags or features need to be set. CPU support SIMD is detected automatically at runtime. (v1.11.1, changelog)
  • BUG #482: Present a better compilation error when the use_std feature isn't used. (v1.11.1, changelog)
  • We adopt Rust 1.20 as the new minimum supported version of Rust for regex. We also tentatively adopt a policy that permits bumping the minimum supported version of Rust in minor version releases of regex, but no patch releases. That is, with respect to semver, we do not strictly consider bumping the minimum version of Rust to be a breaking change, but adopt a conservative stance as a compromise. (v1.11.1, changelog)
  • Octal syntax in regular expressions has been disabled by default. This permits better error messages that inform users that backreferences aren't available. Octal syntax can be re-enabled via the corresponding option on RegexBuilder. (v1.11.1, changelog)
  • (?-u:\B) is no longer allowed in Unicode regexes since it can match at invalid UTF-8 code unit boundaries. (?-u:\b) is still allowed in Unicode regexes. (v1.11.1, changelog)
  • The From<regex_syntax::Error> impl has been removed. This formally removes the public dependency on regex-syntax. (v1.11.1, changelog)
  • A new feature, use_std, has been added and enabled by default. Disabling the feature will result in a compilation error. In the future, this may permit us to support no_std environments (w/ alloc) in a backwards compatible way. (v1.11.1, changelog)
  • FEATURE #459: Include C++'s standard regex library and Boost's regex library in the benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma, PCRE1, PCRE2, RE2 and Tcl in the harness. (v1.11.1, changelog)
  • BUG #445: Clarify order of indices returned by RegexSet match iterator. (v1.11.1, changelog)
  • BUG #461: Improve error messages for invalid regexes like [\d-a]. (v1.11.1, changelog)
  • BUG #464: Fix a bug in the error message pretty printer that could cause a panic when a regex contained a literal \n character. (v1.11.1, changelog)
  • BUG #465: Fix a panic in the parser that was caused by applying a repetition operator to (?flags). (v1.11.1, changelog)
  • BUG #466: Fix a bug where \pC was not recognized as an alias for \p{Other}. (v1.11.1, changelog)
  • BUG #470: Fix a bug where literal searches did more work than necessary for anchored regexes. (v1.11.1, changelog)
  • FEATURE #458: The Hir type in regex-syntax now has a printer. (v1.11.1, changelog)
  • Introduced new nightly-only feature unstable that enables SIMD optimizations for certain types of regexes (v1.11.1, changelog)
  • Removed requirement for additional compile time options for SIMD optimization (v1.11.1, changelog)
  • Implemented automatic CPU feature detection at run time for optimal performance (v1.11.1, changelog)
  • Dropped simd nightly-only crate dependency (v1.11.1, changelog)
  • FEATURE #456: The regex crate now includes AVX2 optimizations in addition to the extant SSSE3 optimization. (v1.11.1, changelog)
  • BUG #455: Fix a bug where (?x)[ / - ] failed to parse. (v1.11.1, changelog)
  • BUG #454: Fix a bug in the nest limit checker being too aggressive. (v1.11.1, changelog)
  • Ground-up rewrite of the regex-syntax crate (v1.11.1, changelog)
  • Error messages for invalid regexes have been greatly improved. You get these automatically; you don't need to do anything. In addition to better formatting, error messages will now explicitly call out the use of look around. When regex 1.0 is released, this will happen for backreferences as well. (v1.11.1, changelog)
  • Full support for intersection, difference and symmetric difference of character classes. These can be used via the &&, -- and ~~ binary operators within classes. (v1.11.1, changelog)
  • A Unicode Level 1 conformant implementation of \p{..} character classes. Things like \p{scx:Hira}, \p{age:3.2} or \p{Changes_When_Casefolded} now work. All property name and value aliases are supported, and properties are selected via loose matching. e.g., \p{Greek} is the same as \p{G r E e K}. (v1.11.1, changelog)
  • A new UNICODE.md document has been added to this repository that exhaustively documents support for UTS#18. (v1.11.1, changelog)
  • Empty sub-expressions are now permitted in most places. That is, ()+ is now a valid regex. (v1.11.1, changelog)
  • Almost everything in regex-syntax now uses constant stack space, even when performing analysis that requires structural induction. This reduces the risk of a user provided regular expression causing a stack overflow. (v1.11.1, changelog)
  • FEATURE #174: The Ast type in regex-syntax now contains span information. (v1.11.1, changelog)
  • FEATURE #424: Support \u, \u{...}, \U and \U{...} syntax for specifying code points in a regular expression. (v1.11.1, changelog)
  • FEATURE #449: Add a Replace::by_ref adapter for use of a replacer without consuming it. (v1.11.1, changelog)
  • BUG #446: We re-enable the Boyer-Moore literal matcher. (v1.11.1, changelog)
  • BUG #446: Fixes a bug in the new Boyer-Moore searcher that results in a match failure. We fix this bug by temporarily disabling Boyer-Moore. (v1.11.1, changelog)
  • BUG #437: Fixes a bug in the new Boyer-Moore searcher that results in a panic. (v1.11.1, changelog)
  • FEATURE #348: Improve performance for capture searches on anchored regex. (Contributed by @​ethanpailes. Nice work!) (v1.11.1, changelog)
  • FEATURE #419: Expand literal searching to include Tuned Boyer-Moore in some cases. (Contributed by @​ethanpailes. Nice work!) (v1.11.1, changelog)
  • BUG: The regex compiler plugin has been removed. (v1.11.1, changelog)
  • BUG: simd has been bumped to 0.2.1, which fixes a Rust nightly build error. (v1.11.1, changelog)
  • BUG: Bring the benchmark harness up to date. (v1.11.1, changelog)
  • FEATURE #374: Add impl From<Match> for &str. (v1.11.1, changelog)
  • FEATURE #380: Derive Clone and PartialEq on Error. (v1.11.1, changelog)
  • FEATURE #400: Update to Unicode 10. (v1.11.1, changelog)
  • BUG #375: Fix a bug that prevented the bounded backtracker from terminating. (v1.11.1, changelog)
  • BUG #393, BUG #394: Fix bug with replace methods for empty matches. (v1.11.1, changelog)
  • FEATURE #341: Support nested character classes and intersection operation. For example, [\p{Greek}&&\pL] matches greek letters and [[0-9]&&[^4]] matches every decimal digit except 4. (Much thanks to @​robinst, who contributed this awesome feature.) (v1.11.1, changelog)
  • BUG #321: Fix bug in literal extraction and UTF-8 decoding. (v1.11.1, changelog)
  • BUG #326: Add documentation tip about the (?x) flag. (v1.11.1, changelog)
  • BUG #333: Show additional replacement example using curly braces. (v1.11.1, changelog)
  • BUG #334: Fix bug when resolving captures after a match. (v1.11.1, changelog)
  • BUG #338: Add example that uses Captures::get to API documentation. (v1.11.1, changelog)
  • BUG #353: Fix RegexSet bug that caused match failure in some cases. (v1.11.1, changelog)
  • BUG #354: Fix panic in parser when (?x) is used. (v1.11.1, changelog)
  • BUG #358: Fix literal optimization bug with RegexSet. (v1.11.1, changelog)
  • BUG #359: Fix example code in README. (v1.11.1, changelog)
  • BUG #365: Fix bug in rure_captures_len in the C binding. (v1.11.1, changelog)
  • BUG #367: Fix byte class bug that caused a panic. (v1.11.1, changelog)
  • Fixed a major bug with replace_all (v1.11.1, changelog)
  • Made couple of other touch-ups (v1.11.1, changelog)
  • BUG #312: Fix documentation for NoExpand to reference correct lifetime parameter. (v1.11.1, changelog)
  • BUG #314: Fix a bug with replace_all when replacing a match with the empty string. (v1.11.1, changelog)
  • BUG #316: Note a missing breaking change from the 0.2.0 CHANGELOG entry. (RegexBuilder::compile was renamed to RegexBuilder::build.) (v1.11.1, changelog)
  • BUG #324: Compiling regex should only require one version of memchr crate. (v1.11.1, changelog)
  • Implement regex 1.0 RFC specification (v1.11.1, changelog)
  • Release version 0.2 as precursor to 1.0 (v1.11.1, changelog)
  • POSIX character classes now require double bracketing. Previously, the regex [:upper:] would parse as the upper POSIX character class. Now it parses as the character class containing the characters :upper:. The fix to this change is to use [[:upper:]] instead. Note that variants like [[:upper:][:blank:]] continue to work. (v1.11.1, changelog)
  • The character [ must always be escaped inside a character class. (v1.11.1, changelog)
  • The characters &, - and ~ must be escaped if any one of them are repeated consecutively. For example, [&], [\&], [\&\&], [&-&] are all equivalent while [&&] is illegal. (The motivation for this and the prior change is to provide a backwards compatible path for adding character class set notation.) (v1.11.1, changelog)
  • A bytes::Regex now has Unicode mode enabled by default (like the main Regex type). This means regexes compiled with bytes::Regex::new that don't have the Unicode flag set should add (?-u) to recover the original behavior. (v1.11.1, changelog)
  • find and find_iter now return Match values instead of (usize, usize). Match values have start and end methods, which return the match offsets. Match values also have an as_str method, which returns the text of the match itself. (v1.11.1, changelog)
  • The Captures type now only provides a single iterator over all capturing matches, which should replace uses of iter and iter_pos. Uses of iter_named should use the capture_names method on Regex. (v1.11.1, changelog)
  • The at method on the Captures type has been renamed to get, and it now returns a Match. Similarly, the name method on Captures now returns a Match. (v1.11.1, changelog)
  • The replace methods now return Cow values. The Cow::Borrowed variant is returned when no replacements are made. (v1.11.1, changelog)
  • The Replacer trait has been completely overhauled. This should only impact clients that implement this trait explicitly. Standard uses of the replace methods should continue to work unchanged. If you implement the Replacer trait, please consult the new documentation. (v1.11.1, changelog)
  • The quote free function has been renamed to escape. (v1.11.1, changelog)
  • The Regex::with_size_limit method has been removed. It is replaced by RegexBuilder::size_limit. (v1.11.1, changelog)
  • The RegexBuilder type has switched from owned self method receivers to &mut self method receivers. Most uses will continue to work unchanged, but some code may require naming an intermediate variable to hold the builder. (v1.11.1, changelog)
  • The compile method on RegexBuilder has been renamed to build. (v1.11.1, changelog)
  • The free is_match function has been removed. It is replaced by compiling a Regex and calling its is_match method. (v1.11.1, changelog)
  • The PartialEq and Eq impls on Regex have been dropped. If you relied on these impls, the fix is to define a wrapper type around Regex, impl Deref on it and provide the necessary impls. (v1.11.1, changelog)
  • The is_empty method on Captures has been removed. This always returns false, so its use is superfluous. (v1.11.1, changelog)
  • The Syntax variant of the Error type now contains a string instead of a regex_syntax::Error. If you were examining syntax errors more closely, you'll need to explicitly use the regex_syntax crate to re-parse the regex. (v1.11.1, changelog)
  • The InvalidSet variant of the Error type has been removed since it is no longer used. (v1.11.1, changelog)
  • Most of the iterator types have been renamed to match conventions. If you were using these iterator types explicitly, please consult the documentation for its new name. For example, RegexSplits has been renamed to Split. (v1.11.1, changelog)
  • BUG #151: The Replacer trait has been changed to permit the caller to control allocation. (v1.11.1, changelog)
  • BUG #165: Remove the free is_match function. (v1.11.1, changelog)
  • BUG #166: Expose more knobs (available in 0.1) and remove with_size_limit. (v1.11.1, changelog)
  • BUG #168: Iterators produced by Captures now have the correct lifetime parameters. (v1.11.1, changelog)
  • BUG #175: Fix a corner case in the parsing of POSIX character classes. (v1.11.1, changelog)
  • BUG #178: Drop the PartialEq and Eq impls on Regex. (v1.11.1, changelog)
  • BUG #179: Remove is_empty from Captures since it always returns false. (v1.11.1, changelog)
  • BUG #276: Position of named capture can now be retrieved from a Captures. (v1.11.1, changelog)
  • BUG #296: Remove winapi/kernel32-sys dependency on UNIX. (v1.11.1, changelog)
  • BUG #307: Fix error on emscripten. (v1.11.1, changelog)
  • PR #292: Fixes bug #291, which was introduced by PR #290. (v1.11.1, changelog)
  • Require regex-syntax 0.3.8. (v1.11.1, changelog)
  • PR #290: Fixes bug #289, which caused some regexes with a certain combination of literals to match incorrectly. (v1.11.1, changelog)
  • PR #281: Fixes bug #280 by disabling all literal optimizations when a pattern is partially anchored. (v1.11.1, changelog)
  • Tweak criteria for using the Teddy literal matcher. (v1.11.1, changelog)
  • PR #275: Improves match verification performance in the Teddy SIMD searcher. (v1.11.1, changelog)
  • PR #278: Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick. (v1.11.1, changelog)
  • Implemented DoubleEndedIterator on regex set match iterators. (v1.11.1, changelog)
  • Release regex-syntax 0.3.5 with a minor bug fix. (v1.11.1, changelog)
  • Fix bug #272. (v1.11.1, changelog)
  • Fix bug #277. (v1.11.1, changelog)
  • PR #270: Fixes bugs #264, #268 and an unreported where the DFA cache size could be drastically underestimated in some cases (leading to high unexpected memory usage). (v1.11.1, changelog)
  • Release regex-syntax 0.3.4. (v1.11.1, changelog)
  • Bump regex-syntax dependency version for regex to 0.3.4. (v1.11.1, changelog)
  • PR #262: Fixes a number of small bugs caught by fuzz testing (AFL). (v1.11.1, changelog)
  • PR #236: Fix a bug in how suffix literals were extracted, which could lead to invalid match behavior in some cases. (v1.11.1, changelog)
  • PR #231: Add SIMD accelerated multiple pattern search. (v1.11.1, changelog)
  • PR #228: Reintroduce the reverse suffix literal optimization. (v1.11.1, changelog)
  • PR #226: Implements NFA state compression in the lazy DFA. (v1.11.1, changelog)
  • PR #223: A fully anchored RegexSet can now short-circuit. (v1.11.1, changelog)
  • PR #216: Tweak the threshold for running backtracking. (v1.11.1, changelog)
  • PR #217: Add upper limit (from the DFA) to capture search (for the NFA). (v1.11.1, changelog)
  • PR #218: Add rure, a C API. (v1.11.1, changelog)
  • PR #210: Fixed a performance bug in bytes::Regex::replace where extend was used instead of extend_from_slice. (v1.11.1, changelog)
  • PR #211: Fixed a bug in the handling of word boundaries in the DFA. (v1.11.1, changelog)
  • PR #213: Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from running regexes using any of the following regex engines: PCRE1, PCRE2, Oniguruma, RE2, Tcl and of course Rust's own regexes. (v1.11.1, changelog)
  • PR #201: Fix undefined behavior in the regex! compiler plugin macro. (v1.11.1, changelog)
  • PR #205: More improvements to DFA performance. Competitive with RE2. See PR for benchmarks. (v1.11.1, changelog)
  • PR #209: Release 0.1.66 was semver incompatible since it required a newer version of Rust than previous releases. This PR fixes that. (And 0.1.66 was yanked.) (v1.11.1, changelog)
  • Speculative support for Unicode word boundaries was added to the DFA. This should remove the last common case that disqualified use of the DFA. (v1.11.1, changelog)
  • An optimization that scanned for suffix literals and then matched the regular expression in reverse was removed because it had worst case quadratic time complexity. It was replaced with a more limited optimization where, given any regex of the form re$, it will be matched in reverse from the end of the haystack. (v1.11.1, changelog)
  • PR #202: The inner loop of the DFA was heavily optimized to improve cache locality and reduce the overall number of instructions run on each iteration. This represents the first use of unsafe in regex (to elide bounds checks). (v1.11.1, changelog)
  • PR #200: Use of the mempool crate (which used thread local storage) was replaced with a faster version of a similar API in @​Amanieu's thread_local crate. It should reduce contention when using a regex from multiple threads simultaneously. (v1.11.1, changelog)
  • PCRE2 JIT benchmarks were added. A benchmark comparison can be found here. (Includes a comparison with PCRE1's JIT and Oniguruma.) (v1.11.1, changelog)
  • A bug where word boundaries weren't being matched correctly in the DFA was fixed. This only affected use of bytes::Regex. (v1.11.1, changelog)
  • #160: Captures now has a Debug impl. (v1.11.1, changelog)
  • Fixed cargo doc breakage on nightly when --cfg docsrs is enabled (v1.12.2, changelog)
  • Fixed documentation build failure on docs.rs (v1.12.2, changelog)
  • BUG #1305: (v1.12.2, changelog)
  • Switches the doc_auto_cfg feature to doc_cfg on nightly for docs.rs builds (v1.12.2, changelog)
  • Fixed bug in regex::Captures::get_match API lifetime parameter for returned Match type (v1.12.2, changelog)
  • Yanked 1.12.0 release due to the lifetime parameter oversight (v1.12.2, changelog)
  • Added new regex::Captures::get_match API (v1.12.2, changelog)
  • Fixed excessive memory consumption in some cases (v1.12.2, changelog)
  • Various bug fixes (v1.12.2, changelog)
  • FEATURE #1146: (v1.12.2, changelog)
  • Add Capture::get_match method for returning the overall match without requiring unwrap() (v1.12.2, changelog)
  • BUG #1083: (v1.12.2, changelog)
  • Fixed a panic in the lazy DFA that occurred with especially large regexes (v1.12.2, changelog)
  • BUG #1116: (v1.12.2, changelog)
  • Fixed a memory usage regression for large regexes that was introduced in regex 1.9 (v1.12.2, changelog)
  • BUG #1195: (v1.12.2, changelog)
  • Fix universal start states in sparse DFA (v1.12.2, changelog)
  • BUG #1295: (v1.12.2, changelog)
  • Fix panic when deserializing a corrupted dense DFA (v1.12.2, changelog)
  • BUG 8f5d9479: (v1.12.2, changelog)
  • Make regex_automata::meta::Regex::find consistently return None when WhichCaptures::None is used (v1.12.2, changelog)
  • Improved memory usage in some cases (v1.12.2, changelog)
  • BUG #1297: (v1.12.2, changelog)
  • Trimmed excess memory capacity in regex matching operations to improve memory usage (v1.12.2, changelog)
  • Minor fixes applied to the regex crate (v1.12.2, changelog)
  • Multiple typo fixes merged (v1.12.2, changelog)
  • Multiple lint fixes merged (v1.12.2, changelog)
  • Now recommend using std::sync::LazyLock (v1.12.2, changelog)
  • BUG #1217: (v1.12.2, changelog)
  • Switch recommendation from once_cell to std::sync::LazyLock (v1.12.2, changelog)
  • BUG #1225: (v1.12.2, changelog)
  • Add DFA::set_prefilter method to regex-automata (v1.12.2, changelog)
  • BUG #1165: (v1.12.2, changelog)
  • Remove std dependency from perf-literal-multisubstring crate feature (v1.12.2, changelog)
  • Clarify the meaning of (?R)$ in the documentation. (v1.12.2, changelog)
  • BUG #1281: (v1.12.2, changelog)
  • Remove fuzz/ directory from published crate on crates.io (v1.12.2, changelog)
  • Clarified documentation that Cow::Borrowed returned from replace APIs is equivalent to the input (v1.12.2, changelog)
  • Fixed a search regression that could report incorrect matches (v1.12.2, changelog)
  • Loosen ASCII-compatible rules to permit Unicode characters in non-Unicode flag groups (v1.12.2, changelog)
  • Expanded the reverse suffix optimization to apply in additional cases beyond its previous scope (v1.12.2, changelog)
  • These assertions support flexible word boundary definitions in grep programs (v1.12.2, changelog)
  • Fixed a bug where Unicode word boundary assertions could produce incorrect match spans when searching non-ASCII strings (v1.12.2, changelog)
  • New word boundary assertions are now supported in regex-automata (v1.12.2, changelog)
  • New word boundary assertions added to regex-syntax (v1.12.2, changelog)
  • Added support for new word boundary assertions in regex-lite 0.1.1 (v1.12.2, changelog)
  • Fixed a bug where computing the maximum haystack length for the bounded backtracker could result in underflow (v1.12.2, changelog)
  • Fixed an issue where the underflow could provoke a panic later in a search due to a broken invariant (v1.12.2, changelog)
  • Fixed performance bug causing massive slow-downs when multiple processes contend on a single regex (v1.12.2, changelog)
  • Fixed a bug where some searches reported incorrect match offsets (v1.12.2, changelog)
  • Bug fix applies to regexes with no prefix or suffix literals but containing an inner literal and a conditional regex prefix (v1.12.2, changelog)
  • Fix incorrect match offsets reported by the reverse inner literal optimization (v1.12.2, changelog)
  • Fix memory usage regression in RegexSet (v1.12.2, changelog)
  • Internal improvements to regex search performance (v1.12.2, changelog)
  • API additions (v1.12.2, changelog)
  • (?m:^) now matches after both \r and \n, but never between a \r and \n (v1.12.2, changelog)
  • New experimental crate regex-lite published (v1.12.2, changelog)
  • regex-lite has reduced Unicode support compared to regex (v1.12.2, changelog)
  • Add TryFrom implementations for the Regex type (v1.12.2, changelog)
  • Inner literals are now used to accelerate regex searches (e.g., \w+@\w+ will scan for @ to improve performance) (v1.12.2, changelog)
  • Applied literal optimizations to regexes with word boundaries and alternation patterns of the form \b(foo|bar|quux)\b (v1.12.2, changelog)
  • Prevented panicking when using match offsets to slice a &str (v1.12.2, changelog)
  • bytes::Regex continues to allow compilation of (?-u:\B) (v1.12.2, changelog)
  • Fix bug where (?-u:\B) was allowed in Unicode regexes, preventing match offsets from splitting codepoints in &str (v1.12.2, changelog)
  • Fixed a bug where a match at every position is erroneously reported (v1.12.2, changelog)
  • Fixed integer overflow in regex compilation with nested large counted repetitions (e.g., a{2147483516}{2147483416}{5}) (v1.12.2, changelog)
  • Fix a bug where a word boundary could interact with prefix literal optimizations and lead to a false positive match (v1.12.2, changelog)
  • The default value for a parameter has been changed to utf8 (v1.12.2, changelog)
  • The boolean parameter's meaning has been inverted/flipped (v1.12.2, changelog)
  • Improve Debug impl for Match so that it doesn't show the entire haystack (v1.12.2, changelog)
  • Fix CaptureLocations::get so that it never panics (v1.12.2, changelog)
  • Clarified documentation for regex::Regex to specify that searches operate on haystacks treated as sequences of Unicode scalar values (v1.12.2, changelog)
  • Optimize case folding to improve performance in pathological cases (v1.12.2, changelog)
  • Fixed a bug that produced incorrect matches when a non-greedy ? operator was used (v1.12.2, changelog)
  • Fixed CI configuration that was not failing the overall build on failed compilation (v1.12.2, changelog)
  • Fixed performance bug in Unicode word boundaries where lazy DFA would incorrectly stop searching on certain regexes with certain inputs, causing unnecessary fallback to slower engine (v1.12.2, changelog)
  • Update to Rust 2018 edition (v1.12.2, changelog)
  • Bump MSRV to Rust 1.41 (previously Rust 1.28) (v1.12.2, changelog)
  • Performance profile of some regexes will change (some may get worse, many expected to improve) (v1.12.2, changelog)
  • Fixed compiler's size check on heap memory usage for regexes (v1.12.2, changelog)
  • Fixed regression in Regex size that was increased in version 1.4.4 (v1.12.2, changelog)
  • Reduced Regex size from 856 bytes to 16 bytes (v1.12.2, changelog)
  • Bug fixes (unspecified) (v1.12.2, changelog)
  • Ban \P{any} pattern in regex (v1.12.2, changelog)
  • Very minor API additions (v1.12.2, changelog)
  • MSRV remains at Rust 1.28 (v1.12.2, changelog)
  • MSRV intended to increase to at least Rust 1.41.1 soon (v1.12.2, changelog)
  • Fixed how regex forwards crate features to regex-syntax to reduce recompilations in some cases (v1.12.2, changelog)
  • Fixed a bug where flags scoped within a group (e.g., (?i)) were incorrectly applying to characters outside that group, causing patterns like ((?i)a)b) to match aB when b should not be case-insensitive (v1.12.2, changelog)
  • Added crate feature to optionally disable Unicode support (v1.12.2, changelog)
  • Added crate feature to optionally reduce runtime performance in exchange for smaller size (v1.12.2, changelog)
  • Added crate features documentation in the docs (v1.12.2, changelog)
  • Delete existing substring search code in regex in favor of bstr implementations (v1.12.2, changelog)
  • Fixed a bug in regex's dependency specification where it requires a newer version of regex-syntax but this wasn't communicated correctly in Cargo.toml (v1.12.2, changelog)
  • Updated aho-corasick dependency to a version where AhoCorasick type is UnwindSafe (v1.12.2, changelog)
  • Fixed multiple bugs in regex (v1.12.2, changelog)
  • Added performance improvement for regex patterns that are simple alternations of literals (v1.12.2, changelog)
  • Automatic CPU feature selection at run time for SIMD optimizations (v1.12.2, changelog)
  • Minimum supported Rust version is now 1.12 (v1.12.2, changelog)
  • Implementation of regex 1.0 RFC (v1.12.2, changelog)
References (5)

[1]: Regex dependency declaration using semantic versioning '1' allows this minor version upgrade

sb/Cargo.toml

Line 21 in a1701d3

regex = "1"

[2]: Uses Regex::new() API which is stable and unchanged in this upgrade

if let Ok(re) = Regex::new(pattern) {

[3]: Uses replace_all() API which is stable and unchanged in this upgrade

sanitized = re.replace_all(&sanitized, *replacement).to_string();

[4]: Security fix: Patches regex compiler DoS vulnerability where empty sub-expressions could bypass size limits, potentially allowing denial-of-service attacks (source link)

[5]: Production validation: Apache Arrow successfully upgraded to regex 1.12.2, demonstrating stability in large-scale projects (source link)


fossabot analyzed this PR using dependency research.

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.

1 participant