This is a patch release which fixes a memory usage regression. In the regex
1.9 release, one of the internal engines used a more aggressive allocation
strategy than what was done previously. This patch release reverts to the
prior on-demand strategy.
Bug fixes:
[BUG #1027](rust-lang/regex#1027):
Change the allocation strategy for the backtracker to be less aggressive.
1.9.0 (2023-07-05)
This release marks the end of a years long rewrite of the regex crate
internals. Since this is
such a big release, please report any issues or regressions you find. We would
also love to hear about improvements as well.
In addition to many internal improvements that should hopefully result in
"my regex searches are faster," there have also been a few API additions:
A new Captures::extract method for quickly accessing the substrings
that match each capture group in a regex.
A new inline flag, R, which enables CRLF mode. This makes . match any
Unicode scalar value except for \r and \n, and also makes (?m:^) and
(?m:$) match after and before both \r and \n, respectively, but never
between a \r and \n.
RegexBuilder::line_terminator was added to further customize the line
terminator used by (?m:^) and (?m:$) to be any arbitrary byte.
The std Cargo feature is now actually optional. That is, the regex crate
can be used without the standard library.
Because regex 1.9 may make binary size and compile times even worse, a
new experimental crate called regex-lite has been published. It prioritizes
binary size and compile times over functionality (like Unicode) and
performance. It shares no code with the regex crate.
New features:
[FEATURE #244](rust-lang/regex#244):
One can opt into CRLF mode via the R flag.
e.g., (?mR:$) matches just before \r\n.
[FEATURE #259](rust-lang/regex#259):
Multi-pattern searches with offsets can be done with regex-automata 0.3.
[FEATURE #476](rust-lang/regex#476):
std is now an optional feature. regex may be used with only alloc.
[FEATURE #644](rust-lang/regex#644):
RegexBuilder::line_terminator configures how (?m:^) and (?m:$) behave.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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 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)
Bumps regex from 1.7.1 to 1.9.1.
Changelog
Sourced from regex's changelog.
... (truncated)
Commits
a47e245
1.9.14136a1b
deps: bump regex-automata to 0.3.1bd87969
regex-automata-0.3.1663fc54
changelog: 1.9.14e89cbf
automata/nfa/backtrack: fix memory usagec51486d
fuzz: tweak limits54690c2
doc: fix typos7c3463d
regex-cli: update compile-test and add recent measurements53786ce
regex-cli-0.1.0a40b1e5
regex-cli: make it publishableDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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 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)