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.
[FEATURE #675](rust-lang/regex#675):
Anchored search APIs are now available in regex-automata 0.3.
[FEATURE #824](rust-lang/regex#824):
Add new Captures::extract method for easier capture group access.
[FEATURE #961](rust-lang/regex#961):
Add regex-lite crate with smaller binary sizes and faster compile times.
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.8.1 to 1.9.0.
Changelog
Sourced from regex's changelog.
... (truncated)
Commits
4f47b14
1.9.0572e857
deps: bump to regex-syntax 0.7.3377f170
regex-syntax-0.7.384dfe50
test: minimal polishing for regex-test crate4f3a3b1
cargo: fix spacing5c10684
api: add TryFrom impls for Regex85d9118
changelog: small updatesaa64e6d
changelog: 1.9.07636ba8
*: lots of polishcacdf37
fuzz: improve Arbitrary impl for Unicode classesDependabot 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)