Skip to content

Commit 8513751

Browse files
committed
changelog: 1.9.0
I usually close tickets on a commit-by-commit basis, but this refactor was so big that it wasn't feasible to do that. So ticket closures are marked here. Closes #244 Closes #259 Closes #476 Closes #644 Closes #675 Closes #824 Closes #961 Closes #68 Closes #510 Closes #787 Closes #891 Closes #429 Closes #517 Closes #579 Closes #779 Closes #850 Closes #921 Closes #976 Closes #1002 Closes #656
1 parent e96bf8f commit 8513751

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

CHANGELOG.md

+77
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1+
1.9.0 (2023-07-05)
2+
==================
3+
This release marks the end of a [years long rewrite of the regex crate
4+
internals](https://github.com/rust-lang/regex/issues/656). Since this is
5+
such a big release, please report any issues or regressions you find. I would
6+
also love to hear about improvements as well.
7+
8+
In addition to many internal improvements that should hopefully result in
9+
"my regex searches are faster," there have also been a few API additions:
10+
11+
* A new `Captures::extract` method exists for quickly accessing the substrings
12+
that match each capture group in a regex.
13+
* A new inline flag, `R`, which enables CRLF mode. This makes `.` match any
14+
Unicode scalar value except for `\r` and `\n`, and also makes `(?m:^)` and
15+
`(?m:$)` match after and before both `\r` and `\n`, respectively, but never
16+
between a `\r` and `\n`.
17+
* `RegexBuilder::line_terminator` was added to further customize the line
18+
terminator used by `(?m:^)` and `(?m:$)` to be any arbitrary byte.
19+
* The `std` Cargo feature is now actually optional. That is, the `regex` crate
20+
can be used without the standard library.
21+
* Because `regex 1.9` may make binary size and compile times even worse, a
22+
new experimental crate called `regex-lite` has been published. It prioritizes
23+
binary size and compile times over functionality (like Unicode) and
24+
performance. It shares no code with the `regex` crate.
25+
26+
New features:
27+
28+
* [FEATURE #244](https://github.com/rust-lang/regex/issues/244):
29+
One can opt into CRLF mode via the `R` flag.
30+
e.g., `(?mR:$)` matches just before `\r\n`.
31+
* [FEATURE #259](https://github.com/rust-lang/regex/issues/259):
32+
Multi-pattern searches with offsets can be done with `regex-automata 0.3`.
33+
* [FEATURE #476](https://github.com/rust-lang/regex/issues/476):
34+
`std` is now an optional feature. `regex` may be used with only `alloc`.
35+
* [FEATURE #644](https://github.com/rust-lang/regex/issues/644):
36+
`RegexBuilder::line_terminator` configures how `(?m:^)` and `(?m:$)` behave.
37+
* [FEATURE #675](https://github.com/rust-lang/regex/issues/675):
38+
Anchored search APIs are now available in `regex-automata 0.3`.
39+
* [FEATURE #824](https://github.com/rust-lang/regex/issues/824):
40+
Add new `Capptures::extract` method for easier capture group access.
41+
* [FEATURE #961](https://github.com/rust-lang/regex/issues/961):
42+
Add `regex-lite` crate with smaller binary sizes and faster compile times.
43+
44+
Performance improvements:
45+
46+
* [PERF #68](https://github.com/rust-lang/regex/issues/68):
47+
Added a one-pass DFA engine for faster capture group matching.
48+
* [PERF #510](https://github.com/rust-lang/regex/issues/510):
49+
Inner literals are now used to accelerate searches, e.g., `\w+@\w+` will scan
50+
for `@`.
51+
* [PERF #787](https://github.com/rust-lang/regex/issues/787),
52+
[PERF #891](https://github.com/rust-lang/regex/issues/891):
53+
Makes literal optimizations apply to regexes of the form `\b(foo|bar|quux)\b`.
54+
55+
(There are many more performance improvements as well, but not all of them have
56+
specific issues devoted to them.)
57+
58+
Bug fixes:
59+
60+
* [BUG #429](https://github.com/rust-lang/regex/issues/429):
61+
Fix matching bugs related to `\B` and inconsistencies across internal engines.
62+
* [BUG #517](https://github.com/rust-lang/regex/issues/517):
63+
Fix matching bug with capture groups.
64+
* [BUG #579](https://github.com/rust-lang/regex/issues/579):
65+
Fix matching bug with word boundaries.
66+
* [BUG #779](https://github.com/rust-lang/regex/issues/779):
67+
Fix bug where some regexes like `(re)+` were not equivalent to `(re)(re)*`.
68+
* [BUG #850](https://github.com/rust-lang/regex/issues/850):
69+
Fix matching bug inconsistency between NFA and DFA engines.
70+
* [BUG #921](https://github.com/rust-lang/regex/issues/921):
71+
Fix matching bug where literal extraction got confused by `$`.
72+
* [BUG #976](https://github.com/rust-lang/regex/issues/976):
73+
Add documentation to replacement routines about dealing with fallibility.
74+
* [BUG #1002](https://github.com/rust-lang/regex/issues/1002):
75+
Use corpus rejection in fuzz testing.
76+
77+
178
1.8.4 (2023-06-05)
279
==================
380
This is a patch release that fixes a bug where `(?-u:\B)` was allowed in

0 commit comments

Comments
 (0)