Debian Codegraph @

debian/rust-vendor/regex/CHANGELOG.md

raw
1 1.13.1 (2026-07-15)
2 ===================
3 This is a release that fixes a bug where incorrect regex match offsets could be
4 reported. Note that this doesn't impact whether a match occurs or not, just
5 where it occurs. The match offsets are still valid for slicing, they just may
6 not refer to the correct leftmost-first match. See
7 [#1364](https://github.com/rust-lang/regex/pull/1364) for (many) more details.
8
9 Bug fixes:
10
11 * [#1354](https://github.com/rust-lang/regex/issues/1354):
12 Fixes previously unsound reverse suffix and inner optimizations.
13
14
15 1.13.0 (2026-07-09)
16 ===================
17 This release includes a new API, a `regex!` macro, for lazy compilation of
18 a regex from a string literal. If you use regexes a lot, it's likely you've
19 already written one exactly like it. The new macro can be used like this:
20
21 ```rust
22 use regex::regex;
23
24 fn is_match(line: &str) -> bool {
25 // The regex will be compiled approximately once and reused automatically.
26 // This avoids the footgun of using `Regex::new` here, which would
27 // guarantee that it would be compiled every time this routine is called.
28 // This would likely make this routine much slower than it needs to be.
29 regex!(r"bar|baz").is_match(line)
30 }
31
32 let hay = "\
33 path/to/foo:54:Blue Harvest
34 path/to/bar:90:Something, Something, Something, Dark Side
35 path/to/baz:3:It's a Trap!
36 ";
37
38 let matches = hay.lines().filter(|line| is_match(line)).count();
39 assert_eq!(matches, 2);
40 ```
41
42 Improvements:
43
44 * [#709](https://github.com/rust-lang/regex/issues/709):
45 Add a new `regex!` macro for efficient and automatic reuse of a compiled regex.
46
47
48 1.12.4 (2026-06-09)
49 ===================
50 This release includes a performance optimization for compilation of regexes
51 with very large character classes.
52
53 Improvements:
54
55 * [#1308](https://github.com/rust-lang/regex/pull/1308):
56 Avoid re-canonicalizing the entire interval set when pushing new class ranges.
57
58
59 1.12.3 (2026-02-03)
60 ===================
61 This release excludes some unnecessary things from the archive published to
62 crates.io. Specifically, fuzzing data and various shell scripts are now
63 excluded. If you run into problems, please file an issue.
64
65 Improvements:
66
67 * [#1319](https://github.com/rust-lang/regex/pull/1319):
68 Switch from a Cargo `exclude` list to an `include` list, and exclude some
69 unnecessary stuff.
70
71
72 1.12.2 (2025-10-13)
73 ===================
74 This release fixes a `cargo doc` breakage on nightly when `--cfg docsrs` is
75 enabled. This caused documentation to fail to build on docs.rs.
76
77 Bug fixes:
78
79 * [BUG #1305](https://github.com/rust-lang/regex/issues/1305):
80 Switches the `doc_auto_cfg` feature to `doc_cfg` on nightly for docs.rs builds.
81
82
83 1.12.1 (2025-10-10)
84 ===================
85 This release makes a bug fix in the new `regex::Captures::get_match` API
86 introduced in `1.12.0`. There was an oversight with the lifetime parameter
87 for the `Match` returned. This is technically a breaking change, but given
88 that it was caught almost immediately and I've yanked the `1.12.0` release,
89 I think this is fine.
90
91
92 1.12.0 (2025-10-10)
93 ===================
94 This release contains a smattering of bug fixes, a fix for excessive memory
95 consumption in some cases and a new `regex::Captures::get_match` API.
96
97 Improvements:
98
99 * [FEATURE #1146](https://github.com/rust-lang/regex/issues/1146):
100 Add `Capture::get_match` for returning the overall match without `unwrap()`.
101
102 Bug fixes:
103
104 * [BUG #1083](https://github.com/rust-lang/regex/issues/1083):
105 Fixes a panic in the lazy DFA (can only occur for especially large regexes).
106 * [BUG #1116](https://github.com/rust-lang/regex/issues/1116):
107 Fixes a memory usage regression for large regexes (introduced in `regex 1.9`).
108 * [BUG #1195](https://github.com/rust-lang/regex/issues/1195):
109 Fix universal start states in sparse DFA.
110 * [BUG #1295](https://github.com/rust-lang/regex/pull/1295):
111 Fixes a panic when deserializing a corrupted dense DFA.
112 * [BUG 8f5d9479](https://github.com/rust-lang/regex/commit/8f5d9479d0f1da5726488a530d7fd66a73d05b80):
113 Make `regex_automata::meta::Regex::find` consistently return `None` when
114 `WhichCaptures::None` is used.
115
116
117 1.11.3 (2025-09-25)
118 ===================
119 This is a small patch release with an improvement in memory usage in some
120 cases.
121
122 Improvements:
123
124 * [BUG #1297](https://github.com/rust-lang/regex/issues/1297):
125 Improve memory usage by trimming excess memory capacity in some spots.
126
127
128 1.11.2 (2025-08-24)
129 ===================
130 This is a new patch release of `regex` with some minor fixes. A larger number
131 of typo or lint fix patches were merged. Also, we now finally recommend using
132 `std::sync::LazyLock`.
133
134 Improvements:
135
136 * [BUG #1217](https://github.com/rust-lang/regex/issues/1217):
137 Switch recommendation from `once_cell` to `std::sync::LazyLock`.
138 * [BUG #1225](https://github.com/rust-lang/regex/issues/1225):
139 Add `DFA::set_prefilter` to `regex-automata`.
140
141 Bug fixes:
142
143 * [BUG #1165](https://github.com/rust-lang/regex/pull/1150):
144 Remove `std` dependency from `perf-literal-multisubstring` crate feature.
145 * [BUG #1165](https://github.com/rust-lang/regex/pull/1165):
146 Clarify the meaning of `(?R)$` in the documentation.
147 * [BUG #1281](https://github.com/rust-lang/regex/pull/1281):
148 Remove `fuzz/` and `record/` directories from published crate on crates.io.
149
150
151 1.11.1 (2024-10-24)
152 ===================
153 This is a new patch release of `regex` that fixes compilation on nightly
154 Rust when the unstable `pattern` crate feature is enabled. Users on nightly
155 Rust without this feature enabled are unaffected.
156
157 Bug fixes:
158
159 * [BUG #1231](https://github.com/rust-lang/regex/issues/1231):
160 Fix the `Pattern` trait implementation as a result of nightly API breakage.
161
162
163 1.11.0 (2024-09-29)
164 ===================
165 This is a new minor release of `regex` that brings in an update to the
166 Unicode Character Database. Specifically, this updates the Unicode data
167 used by `regex` internally to the version 16 release.
168
169 New features:
170
171 * [FEATURE #1228](https://github.com/rust-lang/regex/pull/1228):
172 Add new `regex::SetMatches::matched_all` method.
173 * [FEATURE #1229](https://github.com/rust-lang/regex/pull/1229):
174 Update to Unicode Character Database (UCD) version 16.
175
176
177 1.10.6 (2024-08-02)
178 ===================
179 This is a new patch release with a fix for the `unstable` crate feature that
180 enables `std::str::Pattern` trait integration.
181
182 Bug fixes:
183
184 * [BUG #1219](https://github.com/rust-lang/regex/pull/1219):
185 Fix the `Pattern` trait implementation as a result of nightly API breakage.
186
187
188 1.10.5 (2024-06-09)
189 ===================
190 This is a new patch release with some minor fixes.
191
192 Bug fixes:
193
194 * [BUG #1203](https://github.com/rust-lang/regex/pull/1203):
195 Escape invalid UTF-8 when in the `Debug` impl of `regex::bytes::Match`.
196
197
198 1.10.4 (2024-03-22)
199 ===================
200 This is a new patch release with some minor fixes.
201
202 * [BUG #1169](https://github.com/rust-lang/regex/issues/1169):
203 Fixes a bug with compiling a reverse NFA automaton in `regex-automata`.
204 * [BUG #1178](https://github.com/rust-lang/regex/pull/1178):
205 Clarifies that when `Cow::Borrowed` is returned from replace APIs, it is
206 equivalent to the input.
207
208
209 1.10.3 (2024-01-21)
210 ===================
211 This is a new patch release that fixes the feature configuration of optional
212 dependencies, and fixes an unsound use of bounds check elision.
213
214 Bug fixes:
215
216 * [BUG #1147](https://github.com/rust-lang/regex/issues/1147):
217 Set `default-features=false` for the `memchr` and `aho-corasick` dependencies.
218 * [BUG #1154](https://github.com/rust-lang/regex/pull/1154):
219 Fix unsound bounds check elision.
220
221
222 1.10.2 (2023-10-16)
223 ===================
224 This is a new patch release that fixes a search regression where incorrect
225 matches could be reported.
226
227 Bug fixes:
228
229 * [BUG #1110](https://github.com/rust-lang/regex/issues/1110):
230 Revert broadening of reverse suffix literal optimization introduced in 1.10.1.
231
232
233 1.10.1 (2023-10-14)
234 ===================
235 This is a new patch release with a minor increase in the number of valid
236 patterns and a broadening of some literal optimizations.
237
238 New features:
239
240 * [FEATURE 04f5d7be](https://github.com/rust-lang/regex/commit/04f5d7be4efc542864cc400f5d43fbea4eb9bab6):
241 Loosen ASCII-compatible rules such that regexes like `(?-u:☃)` are now allowed.
242
243 Performance improvements:
244
245 * [PERF 8a8d599f](https://github.com/rust-lang/regex/commit/8a8d599f9d2f2d78e9ad84e4084788c2d563afa5):
246 Broader the reverse suffix optimization to apply in more cases.
247
248
249 1.10.0 (2023-10-09)
250 ===================
251 This is a new minor release of `regex` that adds support for start and end
252 word boundary assertions. That is, `\<` and `\>`. The minimum supported Rust
253 version has also been raised to 1.65, which was released about one year ago.
254
255 The new word boundary assertions are:
256
257 * `\<` or `\b{start}`: a Unicode start-of-word boundary (`\W|\A` on the left,
258 `\w` on the right).
259 * `\>` or `\b{end}`: a Unicode end-of-word boundary (`\w` on the left, `\W|\z`
260 on the right).
261 * `\b{start-half}`: half of a Unicode start-of-word boundary (`\W|\A` on the
262 left).
263 * `\b{end-half}`: half of a Unicode end-of-word boundary (`\W|\z` on the
264 right).
265
266 The `\<` and `\>` are GNU extensions to POSIX regexes. They have been added
267 to the `regex` crate because they enjoy somewhat broad support in other regex
268 engines as well (for example, vim). The `\b{start}` and `\b{end}` assertions
269 are aliases for `\<` and `\>`, respectively.
270
271 The `\b{start-half}` and `\b{end-half}` assertions are not found in any
272 other regex engine (although regex engines with general look-around support
273 can certainly express them). They were added principally to support the
274 implementation of word matching in grep programs, where one generally wants to
275 be a bit more flexible in what is considered a word boundary.
276
277 New features:
278
279 * [FEATURE #469](https://github.com/rust-lang/regex/issues/469):
280 Add support for `\<` and `\>` word boundary assertions.
281 * [FEATURE(regex-automata) #1031](https://github.com/rust-lang/regex/pull/1031):
282 DFAs now have a `start_state` method that doesn't use an `Input`.
283
284 Performance improvements:
285
286 * [PERF #1051](https://github.com/rust-lang/regex/pull/1051):
287 Unicode character class operations have been optimized in `regex-syntax`.
288 * [PERF #1090](https://github.com/rust-lang/regex/issues/1090):
289 Make patterns containing lots of literal characters use less memory.
290
291 Bug fixes:
292
293 * [BUG #1046](https://github.com/rust-lang/regex/issues/1046):
294 Fix a bug that could result in incorrect match spans when using a Unicode word
295 boundary and searching non-ASCII strings.
296 * [BUG(regex-syntax) #1047](https://github.com/rust-lang/regex/issues/1047):
297 Fix panics that can occur in `Ast->Hir` translation (not reachable from `regex`
298 crate).
299 * [BUG(regex-syntax) #1088](https://github.com/rust-lang/regex/issues/1088):
300 Remove guarantees in the API that connect the `u` flag with a specific HIR
301 representation.
302
303 `regex-automata` breaking change release:
304
305 This release includes a `regex-automata 0.4.0` breaking change release, which
306 was necessary in order to support the new word boundary assertions. For
307 example, the `Look` enum has new variants and the `LookSet` type now uses `u32`
308 instead of `u16` to represent a bitset of look-around assertions. These are
309 overall very minor changes, and most users of `regex-automata` should be able
310 to move to `0.4` from `0.3` without any changes at all.
311
312 `regex-syntax` breaking change release:
313
314 This release also includes a `regex-syntax 0.8.0` breaking change release,
315 which, like `regex-automata`, was necessary in order to support the new word
316 boundary assertions. This release also includes some changes to the `Ast`
317 type to reduce heap usage in some cases. If you are using the `Ast` type
318 directly, your code may require some minor modifications. Otherwise, users of
319 `regex-syntax 0.7` should be able to migrate to `0.8` without any code changes.
320
321 `regex-lite` release:
322
323 The `regex-lite 0.1.1` release contains support for the new word boundary
324 assertions. There are no breaking changes.
325
326
327 1.9.6 (2023-09-30)
328 ==================
329 This is a patch release that fixes a panic that can occur when the default
330 regex size limit is increased to a large number.
331
332 * [BUG aa4e4c71](https://github.com/rust-lang/regex/commit/aa4e4c7120b0090ce0624e3c42a2ed06dd8b918a):
333 Fix a bug where computing the maximum haystack length for the bounded
334 backtracker could result underflow and thus provoke a panic later in a search
335 due to a broken invariant.
336
337
338 1.9.5 (2023-09-02)
339 ==================
340 This is a patch release that hopefully mostly fixes a performance bug that
341 occurs when sharing a regex across multiple threads.
342
343 Issue [#934](https://github.com/rust-lang/regex/issues/934)
344 explains this in more detail. It is [also noted in the crate
345 documentation](https://docs.rs/regex/latest/regex/#sharing-a-regex-across-threads-can-result-in-contention).
346 The bug can appear when sharing a regex across multiple threads simultaneously,
347 as might be the case when using a regex from a `OnceLock`, `lazy_static` or
348 similar primitive. Usually high contention only results when using many threads
349 to execute searches on small haystacks.
350
351 One can avoid the contention problem entirely through one of two methods.
352 The first is to use lower level APIs from `regex-automata` that require passing
353 state explicitly, such as [`meta::Regex::search_with`](https://docs.rs/regex-automata/latest/regex_automata/meta/struct.Regex.html#method.search_with).
354 The second is to clone a regex and send it to other threads explicitly. This
355 will not use any additional memory usage compared to sharing the regex. The
356 only downside of this approach is that it may be less convenient, for example,
357 it won't work with things like `OnceLock` or `lazy_static` or `once_cell`.
358
359 With that said, as of this release, the contention performance problems have
360 been greatly reduced. This was achieved by changing the free-list so that it
361 was sharded across threads, and that ensuring each sharded mutex occupies a
362 single cache line to mitigate false sharing. So while contention may still
363 impact performance in some cases, it should be a lot better now.
364
365 Because of the changes to how the free-list works, please report any issues you
366 find with this release. That not only includes search time regressions but also
367 significant regressions in memory usage. Reporting improvements is also welcome
368 as well! If possible, provide a reproduction.
369
370 Bug fixes:
371
372 * [BUG #934](https://github.com/rust-lang/regex/issues/934):
373 Fix a performance bug where high contention on a single regex led to massive
374 slow-downs.
375
376
377 1.9.4 (2023-08-26)
378 ==================
379 This is a patch release that fixes a bug where `RegexSet::is_match(..)` could
380 incorrectly return false (even when `RegexSet::matches(..).matched_any()`
381 returns true).
382
383 Bug fixes:
384
385 * [BUG #1070](https://github.com/rust-lang/regex/issues/1070):
386 Fix a bug where a prefilter was incorrectly configured for a `RegexSet`.
387
388
389 1.9.3 (2023-08-05)
390 ==================
391 This is a patch release that fixes a bug where some searches could result in
392 incorrect match offsets being reported. It is difficult to characterize the
393 types of regexes susceptible to this bug. They generally involve patterns
394 that contain no prefix or suffix literals, but have an inner literal along with
395 a regex prefix that can conditionally match.
396
397 Bug fixes:
398
399 * [BUG #1060](https://github.com/rust-lang/regex/issues/1060):
400 Fix a bug with the reverse inner literal optimization reporting incorrect match
401 offsets.
402
403
404 1.9.2 (2023-08-05)
405 ==================
406 This is a patch release that fixes another memory usage regression. This
407 particular regression occurred only when using a `RegexSet`. In some cases,
408 much more heap memory (by one or two orders of magnitude) was allocated than in
409 versions prior to 1.9.0.
410
411 Bug fixes:
412
413 * [BUG #1059](https://github.com/rust-lang/regex/issues/1059):
414 Fix a memory usage regression when using a `RegexSet`.
415
416
417 1.9.1 (2023-07-07)
418 ==================
419 This is a patch release which fixes a memory usage regression. In the regex
420 1.9 release, one of the internal engines used a more aggressive allocation
421 strategy than what was done previously. This patch release reverts to the
422 prior on-demand strategy.
423
424 Bug fixes:
425
426 * [BUG #1027](https://github.com/rust-lang/regex/issues/1027):
427 Change the allocation strategy for the backtracker to be less aggressive.
428
429
430 1.9.0 (2023-07-05)
431 ==================
432 This release marks the end of a [years long rewrite of the regex crate
433 internals](https://github.com/rust-lang/regex/issues/656). Since this is
434 such a big release, please report any issues or regressions you find. We would
435 also love to hear about improvements as well.
436
437 In addition to many internal improvements that should hopefully result in
438 "my regex searches are faster," there have also been a few API additions:
439
440 * A new `Captures::extract` method for quickly accessing the substrings
441 that match each capture group in a regex.
442 * A new inline flag, `R`, which enables CRLF mode. This makes `.` match any
443 Unicode scalar value except for `\r` and `\n`, and also makes `(?m:^)` and
444 `(?m:$)` match after and before both `\r` and `\n`, respectively, but never
445 between a `\r` and `\n`.
446 * `RegexBuilder::line_terminator` was added to further customize the line
447 terminator used by `(?m:^)` and `(?m:$)` to be any arbitrary byte.
448 * The `std` Cargo feature is now actually optional. That is, the `regex` crate
449 can be used without the standard library.
450 * Because `regex 1.9` may make binary size and compile times even worse, a
451 new experimental crate called `regex-lite` has been published. It prioritizes
452 binary size and compile times over functionality (like Unicode) and
453 performance. It shares no code with the `regex` crate.
454
455 New features:
456
457 * [FEATURE #244](https://github.com/rust-lang/regex/issues/244):
458 One can opt into CRLF mode via the `R` flag.
459 e.g., `(?mR:$)` matches just before `\r\n`.
460 * [FEATURE #259](https://github.com/rust-lang/regex/issues/259):
461 Multi-pattern searches with offsets can be done with `regex-automata 0.3`.
462 * [FEATURE #476](https://github.com/rust-lang/regex/issues/476):
463 `std` is now an optional feature. `regex` may be used with only `alloc`.
464 * [FEATURE #644](https://github.com/rust-lang/regex/issues/644):
465 `RegexBuilder::line_terminator` configures how `(?m:^)` and `(?m:$)` behave.
466 * [FEATURE #675](https://github.com/rust-lang/regex/issues/675):
467 Anchored search APIs are now available in `regex-automata 0.3`.
468 * [FEATURE #824](https://github.com/rust-lang/regex/issues/824):
469 Add new `Captures::extract` method for easier capture group access.
470 * [FEATURE #961](https://github.com/rust-lang/regex/issues/961):
471 Add `regex-lite` crate with smaller binary sizes and faster compile times.
472 * [FEATURE #1022](https://github.com/rust-lang/regex/pull/1022):
473 Add `TryFrom` implementations for the `Regex` type.
474
475 Performance improvements:
476
477 * [PERF #68](https://github.com/rust-lang/regex/issues/68):
478 Added a one-pass DFA engine for faster capture group matching.
479 * [PERF #510](https://github.com/rust-lang/regex/issues/510):
480 Inner literals are now used to accelerate searches, e.g., `\w+@\w+` will scan
481 for `@`.
482 * [PERF #787](https://github.com/rust-lang/regex/issues/787),
483 [PERF #891](https://github.com/rust-lang/regex/issues/891):
484 Makes literal optimizations apply to regexes of the form `\b(foo|bar|quux)\b`.
485
486 (There are many more performance improvements as well, but not all of them have
487 specific issues devoted to them.)
488
489 Bug fixes:
490
491 * [BUG #429](https://github.com/rust-lang/regex/issues/429):
492 Fix matching bugs related to `\B` and inconsistencies across internal engines.
493 * [BUG #517](https://github.com/rust-lang/regex/issues/517):
494 Fix matching bug with capture groups.
495 * [BUG #579](https://github.com/rust-lang/regex/issues/579):
496 Fix matching bug with word boundaries.
497 * [BUG #779](https://github.com/rust-lang/regex/issues/779):
498 Fix bug where some regexes like `(re)+` were not equivalent to `(re)(re)*`.
499 * [BUG #850](https://github.com/rust-lang/regex/issues/850):
500 Fix matching bug inconsistency between NFA and DFA engines.
501 * [BUG #921](https://github.com/rust-lang/regex/issues/921):
502 Fix matching bug where literal extraction got confused by `$`.
503 * [BUG #976](https://github.com/rust-lang/regex/issues/976):
504 Add documentation to replacement routines about dealing with fallibility.
505 * [BUG #1002](https://github.com/rust-lang/regex/issues/1002):
506 Use corpus rejection in fuzz testing.
507
508
509 1.8.4 (2023-06-05)
510 ==================
511 This is a patch release that fixes a bug where `(?-u:\B)` was allowed in
512 Unicode regexes, despite the fact that the current matching engines can report
513 match offsets between the code units of a single UTF-8 encoded codepoint. That
514 in turn means that match offsets that split a codepoint could be reported,
515 which in turn results in panicking when one uses them to slice a `&str`.
516
517 This bug occurred in the transition to `regex 1.8` because the underlying
518 syntactical error that prevented this regex from compiling was intentionally
519 removed. That's because `(?-u:\B)` will be permitted in Unicode regexes in
520 `regex 1.9`, but the matching engines will guarantee to never report match
521 offsets that split a codepoint. When the underlying syntactical error was
522 removed, no code was added to ensure that `(?-u:\B)` didn't compile in the
523 `regex 1.8` transition release. This release, `regex 1.8.4`, adds that code
524 such that `Regex::new(r"(?-u:\B)")` returns to the `regex <1.8` behavior of
525 not compiling. (A `bytes::Regex` can still of course compile it.)
526
527 Bug fixes:
528
529 * [BUG #1006](https://github.com/rust-lang/regex/issues/1006):
530 Fix a bug where `(?-u:\B)` was allowed in Unicode regexes, and in turn could
531 lead to match offsets that split a codepoint in `&str`.
532
533
534 1.8.3 (2023-05-25)
535 ==================
536 This is a patch release that fixes a bug where the regex would report a
537 match at every position even when it shouldn't. This could occur in a very
538 small subset of regexes, usually an alternation of simple literals that
539 have particular properties. (See the issue linked below for a more precise
540 description.)
541
542 Bug fixes:
543
544 * [BUG #999](https://github.com/rust-lang/regex/issues/999):
545 Fix a bug where a match at every position is erroneously reported.
546
547
548 1.8.2 (2023-05-22)
549 ==================
550 This is a patch release that fixes a bug where regex compilation could panic
551 in debug mode for regexes with large counted repetitions. For example,
552 `a{2147483516}{2147483416}{5}` resulted in an integer overflow that wrapped
553 in release mode but panicking in debug mode. Despite the unintended wrapping
554 arithmetic in release mode, it didn't cause any other logical bugs since the
555 errant code was for new analysis that wasn't used yet.
556
557 Bug fixes:
558
559 * [BUG #995](https://github.com/rust-lang/regex/issues/995):
560 Fix a bug where regex compilation with large counted repetitions could panic.
561
562
563 1.8.1 (2023-04-21)
564 ==================
565 This is a patch release that fixes a bug where a regex match could be reported
566 where none was found. Specifically, the bug occurs when a pattern contains some
567 literal prefixes that could be extracted _and_ an optional word boundary in the
568 prefix.
569
570 Bug fixes:
571
572 * [BUG #981](https://github.com/rust-lang/regex/issues/981):
573 Fix a bug where a word boundary could interact with prefix literal
574 optimizations and lead to a false positive match.
575
576
577 1.8.0 (2023-04-20)
578 ==================
579 This is a sizeable release that will be soon followed by another sizeable
580 release. Both of them will combined close over 40 existing issues and PRs.
581
582 This first release, despite its size, essentially represents preparatory work
583 for the second release, which will be even bigger. Namely, this release:
584
585 * Increases the MSRV to Rust 1.60.0, which was released about 1 year ago.
586 * Upgrades its dependency on `aho-corasick` to the recently released 1.0
587 version.
588 * Upgrades its dependency on `regex-syntax` to the simultaneously released
589 `0.7` version. The changes to `regex-syntax` principally revolve around a
590 rewrite of its literal extraction code and a number of simplifications and
591 optimizations to its high-level intermediate representation (HIR).
592
593 The second release, which will follow ~shortly after the release above, will
594 contain a soup-to-nuts rewrite of every regex engine. This will be done by
595 bringing [`regex-automata`](https://github.com/BurntSushi/regex-automata) into
596 this repository, and then changing the `regex` crate to be nothing but an API
597 shim layer on top of `regex-automata`'s API.
598
599 These tandem releases are the culmination of about 3
600 years of on-and-off work that [began in earnest in March
601 2020](https://github.com/rust-lang/regex/issues/656).
602
603 Because of the scale of changes involved in these releases, I would love to
604 hear about your experience. Especially if you notice undocumented changes in
605 behavior or performance changes (positive *or* negative).
606
607 Most changes in the first release are listed below. For more details, please
608 see the commit log, which reflects a linear and decently documented history
609 of all changes.
610
611 New features:
612
613 * [FEATURE #501](https://github.com/rust-lang/regex/issues/501):
614 Permit many more characters to be escaped, even if they have no significance.
615 More specifically, any ASCII character except for `[0-9A-Za-z<>]` can now be
616 escaped. Also, a new routine, `is_escapeable_character`, has been added to
617 `regex-syntax` to query whether a character is escapable or not.
618 * [FEATURE #547](https://github.com/rust-lang/regex/issues/547):
619 Add `Regex::captures_at`. This fills a hole in the API, but doesn't otherwise
620 introduce any new expressive power.
621 * [FEATURE #595](https://github.com/rust-lang/regex/issues/595):
622 Capture group names are now Unicode-aware. They can now begin with either a `_`
623 or any "alphabetic" codepoint. After the first codepoint, subsequent codepoints
624 can be any sequence of alphanumeric codepoints, along with `_`, `.`, `[` and
625 `]`. Note that replacement syntax has not changed.
626 * [FEATURE #810](https://github.com/rust-lang/regex/issues/810):
627 Add `Match::is_empty` and `Match::len` APIs.
628 * [FEATURE #905](https://github.com/rust-lang/regex/issues/905):
629 Add an `impl Default for RegexSet`, with the default being the empty set.
630 * [FEATURE #908](https://github.com/rust-lang/regex/issues/908):
631 A new method, `Regex::static_captures_len`, has been added which returns the
632 number of capture groups in the pattern if and only if every possible match
633 always contains the same number of matching groups.
634 * [FEATURE #955](https://github.com/rust-lang/regex/issues/955):
635 Named captures can now be written as `(?<name>re)` in addition to
636 `(?P<name>re)`.
637 * FEATURE: `regex-syntax` now supports empty character classes.
638 * FEATURE: `regex-syntax` now has an optional `std` feature. (This will come
639 to `regex` in the second release.)
640 * FEATURE: The `Hir` type in `regex-syntax` has had a number of simplifications
641 made to it.
642 * FEATURE: `regex-syntax` has support for a new `R` flag for enabling CRLF
643 mode. This will be supported in `regex` proper in the second release.
644 * FEATURE: `regex-syntax` now has proper support for "regex that never
645 matches" via `Hir::fail()`.
646 * FEATURE: The `hir::literal` module of `regex-syntax` has been completely
647 re-worked. It now has more documentation, examples and advice.
648 * FEATURE: The `allow_invalid_utf8` option in `regex-syntax` has been renamed
649 to `utf8`, and the meaning of the boolean has been flipped.
650
651 Performance improvements:
652
653 * PERF: The upgrade to `aho-corasick 1.0` may improve performance in some
654 cases. It's difficult to characterize exactly which patterns this might impact,
655 but if there are a small number of longish (>= 4 bytes) prefix literals, then
656 it might be faster than before.
657
658 Bug fixes:
659
660 * [BUG #514](https://github.com/rust-lang/regex/issues/514):
661 Improve `Debug` impl for `Match` so that it doesn't show the entire haystack.
662 * BUGS [#516](https://github.com/rust-lang/regex/issues/516),
663 [#731](https://github.com/rust-lang/regex/issues/731):
664 Fix a number of issues with printing `Hir` values as regex patterns.
665 * [BUG #610](https://github.com/rust-lang/regex/issues/610):
666 Add explicit example of `foo|bar` in the regex syntax docs.
667 * [BUG #625](https://github.com/rust-lang/regex/issues/625):
668 Clarify that `SetMatches::len` does not (regrettably) refer to the number of
669 matches in the set.
670 * [BUG #660](https://github.com/rust-lang/regex/issues/660):
671 Clarify "verbose mode" in regex syntax documentation.
672 * BUG [#738](https://github.com/rust-lang/regex/issues/738),
673 [#950](https://github.com/rust-lang/regex/issues/950):
674 Fix `CaptureLocations::get` so that it never panics.
675 * [BUG #747](https://github.com/rust-lang/regex/issues/747):
676 Clarify documentation for `Regex::shortest_match`.
677 * [BUG #835](https://github.com/rust-lang/regex/issues/835):
678 Fix `\p{Sc}` so that it is equivalent to `\p{Currency_Symbol}`.
679 * [BUG #846](https://github.com/rust-lang/regex/issues/846):
680 Add more clarifying documentation to the `CompiledTooBig` error variant.
681 * [BUG #854](https://github.com/rust-lang/regex/issues/854):
682 Clarify that `regex::Regex` searches as if the haystack is a sequence of
683 Unicode scalar values.
684 * [BUG #884](https://github.com/rust-lang/regex/issues/884):
685 Replace `__Nonexhaustive` variants with `#[non_exhaustive]` attribute.
686 * [BUG #893](https://github.com/rust-lang/regex/pull/893):
687 Optimize case folding since it can get quite slow in some pathological cases.
688 * [BUG #895](https://github.com/rust-lang/regex/issues/895):
689 Reject `(?-u:\W)` in `regex::Regex` APIs.
690 * [BUG #942](https://github.com/rust-lang/regex/issues/942):
691 Add a missing `void` keyword to indicate "no parameters" in C API.
692 * [BUG #965](https://github.com/rust-lang/regex/issues/965):
693 Fix `\p{Lc}` so that it is equivalent to `\p{Cased_Letter}`.
694 * [BUG #975](https://github.com/rust-lang/regex/issues/975):
695 Clarify documentation for `\pX` syntax.
696
697
698 1.7.3 (2023-03-24)
699 ==================
700 This is a small release that fixes a bug in `Regex::shortest_match_at` that
701 could cause it to panic, even when the offset given is valid.
702
703 Bug fixes:
704
705 * [BUG #969](https://github.com/rust-lang/regex/issues/969):
706 Fix a bug in how the reverse DFA was called for `Regex::shortest_match_at`.
707
708
709 1.7.2 (2023-03-21)
710 ==================
711 This is a small release that fixes a failing test on FreeBSD.
712
713 Bug fixes:
714
715 * [BUG #967](https://github.com/rust-lang/regex/issues/967):
716 Fix "no stack overflow" test which can fail due to the small stack size.
717
718
719 1.7.1 (2023-01-09)
720 ==================
721 This release was done principally to try and fix the doc.rs rendering for the
722 regex crate.
723
724 Performance improvements:
725
726 * [PERF #930](https://github.com/rust-lang/regex/pull/930):
727 Optimize `replacen`. This also applies to `replace`, but not `replace_all`.
728
729 Bug fixes:
730
731 * [BUG #945](https://github.com/rust-lang/regex/issues/945):
732 Maybe fix rustdoc rendering by just bumping a new release?
733
734
735 1.7.0 (2022-11-05)
736 ==================
737 This release principally includes an upgrade to Unicode 15.
738
739 New features:
740
741 * [FEATURE #832](https://github.com/rust-lang/regex/issues/916):
742 Upgrade to Unicode 15.
743
744
745 1.6.0 (2022-07-05)
746 ==================
747 This release principally includes an upgrade to Unicode 14.
748
749 New features:
750
751 * [FEATURE #832](https://github.com/rust-lang/regex/pull/832):
752 Clarify that `Captures::len` includes all groups, not just matching groups.
753 * [FEATURE #857](https://github.com/rust-lang/regex/pull/857):
754 Add an `ExactSizeIterator` impl for `SubCaptureMatches`.
755 * [FEATURE #861](https://github.com/rust-lang/regex/pull/861):
756 Improve `RegexSet` documentation examples.
757 * [FEATURE #877](https://github.com/rust-lang/regex/issues/877):
758 Upgrade to Unicode 14.
759
760 Bug fixes:
761
762 * [BUG #792](https://github.com/rust-lang/regex/issues/792):
763 Fix error message rendering bug.
764
765
766 1.5.6 (2022-05-20)
767 ==================
768 This release includes a few bug fixes, including a bug that produced incorrect
769 matches when a non-greedy `?` operator was used.
770
771 * [BUG #680](https://github.com/rust-lang/regex/issues/680):
772 Fixes a bug where `[[:alnum:][:^ascii:]]` dropped `[:alnum:]` from the class.
773 * [BUG #859](https://github.com/rust-lang/regex/issues/859):
774 Fixes a bug where `Hir::is_match_empty` returned `false` for `\b`.
775 * [BUG #862](https://github.com/rust-lang/regex/issues/862):
776 Fixes a bug where 'ab??' matches 'ab' instead of 'a' in 'ab'.
777
778
779 1.5.5 (2022-03-08)
780 ==================
781 This releases fixes a security bug in the regex compiler. This bug permits a
782 vector for a denial-of-service attack in cases where the regex being compiled
783 is untrusted. There are no known problems where the regex is itself trusted,
784 including in cases of untrusted haystacks.
785
786 * [SECURITY #GHSA-m5pq-gvj9-9vr8](https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8):
787 Fixes a bug in the regex compiler where empty sub-expressions subverted the
788 existing mitigations in place to enforce a size limit on compiled regexes.
789 The Rust Security Response WG published an advisory about this:
790 https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw
791
792
793 1.5.4 (2021-05-06)
794 ==================
795 This release fixes another compilation failure when building regex. This time,
796 the fix is for when the `pattern` feature is enabled, which only works on
797 nightly Rust. CI has been updated to test this case.
798
799 * [BUG #772](https://github.com/rust-lang/regex/pull/772):
800 Fix build when `pattern` feature is enabled.
801
802
803 1.5.3 (2021-05-01)
804 ==================
805 This releases fixes a bug when building regex with only the `unicode-perl`
806 feature. It turns out that while CI was building this configuration, it wasn't
807 actually failing the overall build on a failed compilation.
808
809 * [BUG #769](https://github.com/rust-lang/regex/issues/769):
810 Fix build in `regex-syntax` when only the `unicode-perl` feature is enabled.
811
812
813 1.5.2 (2021-05-01)
814 ==================
815 This release fixes a performance bug when Unicode word boundaries are used.
816 Namely, for certain regexes on certain inputs, it's possible for the lazy DFA
817 to stop searching (causing a fallback to a slower engine) when it doesn't
818 actually need to.
819
820 [PR #768](https://github.com/rust-lang/regex/pull/768) fixes the bug, which was
821 originally reported in
822 [ripgrep#1860](https://github.com/BurntSushi/ripgrep/issues/1860).
823
824
825 1.5.1 (2021-04-30)
826 ==================
827 This is a patch release that fixes a compilation error when the `perf-literal`
828 feature is not enabled.
829
830
831 1.5.0 (2021-04-30)
832 ==================
833 This release primarily updates to Rust 2018 (finally) and bumps the MSRV to
834 Rust 1.41 (from Rust 1.28). Rust 1.41 was chosen because it's still reasonably
835 old, and is what's in Debian stable at the time of writing.
836
837 This release also drops this crate's own bespoke substring search algorithms
838 in favor of a new
839 [`memmem` implementation provided by the `memchr` crate](https://docs.rs/memchr/2.4.0/memchr/memmem/index.html).
840 This will change the performance profile of some regexes, sometimes getting a
841 little worse, and hopefully more frequently, getting a lot better. Please
842 report any serious performance regressions if you find them.
843
844
845 1.4.6 (2021-04-22)
846 ==================
847 This is a small patch release that fixes the compiler's size check on how much
848 heap memory a regex uses. Previously, the compiler did not account for the
849 heap usage of Unicode character classes. Now it does. It's possible that this
850 may make some regexes fail to compile that previously did compile. If that
851 happens, please file an issue.
852
853 * [BUG OSS-fuzz#33579](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33579):
854 Some regexes can use more heap memory than one would expect.
855
856
857 1.4.5 (2021-03-14)
858 ==================
859 This is a small patch release that fixes a regression in the size of a `Regex`
860 in the 1.4.4 release. Prior to 1.4.4, a `Regex` was 552 bytes. In the 1.4.4
861 release, it was 856 bytes due to internal changes. In this release, a `Regex`
862 is now 16 bytes. In general, the size of a `Regex` was never something that was
863 on my radar, but this increased size in the 1.4.4 release seems to have crossed
864 a threshold and resulted in stack overflows in some programs.
865
866 * [BUG #750](https://github.com/rust-lang/regex/pull/750):
867 Fixes stack overflows seemingly caused by a large `Regex` size by decreasing
868 its size.
869
870
871 1.4.4 (2021-03-11)
872 ==================
873 This is a small patch release that contains some bug fixes. Notably, it also
874 drops the `thread_local` (and `lazy_static`, via transitivity) dependencies.
875
876 Bug fixes:
877
878 * [BUG #362](https://github.com/rust-lang/regex/pull/362):
879 Memory leaks caused by an internal caching strategy should now be fixed.
880 * [BUG #576](https://github.com/rust-lang/regex/pull/576):
881 All regex types now implement `UnwindSafe` and `RefUnwindSafe`.
882 * [BUG #728](https://github.com/rust-lang/regex/pull/749):
883 Add missing `Replacer` impls for `Vec<u8>`, `String`, `Cow`, etc.
884
885
886 1.4.3 (2021-01-08)
887 ==================
888 This is a small patch release that adds some missing standard trait
889 implementations for some types in the public API.
890
891 Bug fixes:
892
893 * [BUG #734](https://github.com/rust-lang/regex/pull/734):
894 Add `FusedIterator` and `ExactSizeIterator` impls to iterator types.
895 * [BUG #735](https://github.com/rust-lang/regex/pull/735):
896 Add missing `Debug` impls to public API types.
897
898
899 1.4.2 (2020-11-01)
900 ==================
901 This is a small bug fix release that bans `\P{any}`. We previously banned empty
902 classes like `[^\w\W]`, but missed the `\P{any}` case. In the future, we hope
903 to permit empty classes.
904
905 * [BUG #722](https://github.com/rust-lang/regex/issues/722):
906 Ban `\P{any}` to avoid a panic in the regex compiler. Found by OSS-Fuzz.
907
908
909 1.4.1 (2020-10-13)
910 ==================
911 This is a small bug fix release that makes `\p{cf}` work. Previously, it would
912 report "property not found" even though `cf` is a valid abbreviation for the
913 `Format` general category.
914
915 * [BUG #719](https://github.com/rust-lang/regex/issues/719):
916 Fixes bug that prevented `\p{cf}` from working.
917
918
919 1.4.0 (2020-10-11)
920 ==================
921 This releases has a few minor documentation fixes as well as some very minor
922 API additions. The MSRV remains at Rust 1.28 for now, but this is intended to
923 increase to at least Rust 1.41.1 soon.
924
925 This release also adds support for OSS-Fuzz. Kudos to
926 [@DavidKorczynski](https://github.com/DavidKorczynski)
927 for doing the heavy lifting for that!
928
929 New features:
930
931 * [FEATURE #649](https://github.com/rust-lang/regex/issues/649):
932 Support `[`, `]` and `.` in capture group names.
933 * [FEATURE #687](https://github.com/rust-lang/regex/issues/687):
934 Add `is_empty` predicate to `RegexSet`.
935 * [FEATURE #689](https://github.com/rust-lang/regex/issues/689):
936 Implement `Clone` for `SubCaptureMatches`.
937 * [FEATURE #715](https://github.com/rust-lang/regex/issues/715):
938 Add `empty` constructor to `RegexSet` for convenience.
939
940 Bug fixes:
941
942 * [BUG #694](https://github.com/rust-lang/regex/issues/694):
943 Fix doc example for `Replacer::replace_append`.
944 * [BUG #698](https://github.com/rust-lang/regex/issues/698):
945 Clarify docs for `s` flag when using a `bytes::Regex`.
946 * [BUG #711](https://github.com/rust-lang/regex/issues/711):
947 Clarify `is_match` docs to indicate that it can match anywhere in string.
948
949
950 1.3.9 (2020-05-28)
951 ==================
952 This release fixes a MSRV (Minimum Support Rust Version) regression in the
953 1.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not
954 compile on other Rust versions, such as Rust 1.39.
955
956 Bug fixes:
957
958 * [BUG #685](https://github.com/rust-lang/regex/issues/685):
959 Remove use of `doc_comment` crate, which cannot be used before Rust 1.43.
960
961
962 1.3.8 (2020-05-28)
963 ==================
964 This release contains a couple of important bug fixes driven
965 by better support for empty-subexpressions in regexes. For
966 example, regexes like `b|` are now allowed. Major thanks to
967 [@sliquister](https://github.com/sliquister) for implementing support for this
968 in [#677](https://github.com/rust-lang/regex/pull/677).
969
970 Bug fixes:
971
972 * [BUG #523](https://github.com/rust-lang/regex/pull/523):
973 Add note to documentation that spaces can be escaped in `x` mode.
974 * [BUG #524](https://github.com/rust-lang/regex/issues/524):
975 Add support for empty sub-expressions, including empty alternations.
976 * [BUG #659](https://github.com/rust-lang/regex/issues/659):
977 Fix match bug caused by an empty sub-expression miscompilation.
978
979
980 1.3.7 (2020-04-17)
981 ==================
982 This release contains a small bug fix that fixes how `regex` forwards crate
983 features to `regex-syntax`. In particular, this will reduce recompilations in
984 some cases.
985
986 Bug fixes:
987
988 * [BUG #665](https://github.com/rust-lang/regex/pull/665):
989 Fix feature forwarding to `regex-syntax`.
990
991
992 1.3.6 (2020-03-24)
993 ==================
994 This release contains a sizable (~30%) performance improvement when compiling
995 some kinds of large regular expressions.
996
997 Performance improvements:
998
999 * [PERF #657](https://github.com/rust-lang/regex/pull/657):
1000 Improvement performance of compiling large regular expressions.
1001
1002
1003 1.3.5 (2020-03-12)
1004 ==================
1005 This release updates this crate to Unicode 13.
1006
1007 New features:
1008
1009 * [FEATURE #653](https://github.com/rust-lang/regex/pull/653):
1010 Update `regex-syntax` to Unicode 13.
1011
1012
1013 1.3.4 (2020-01-30)
1014 ==================
1015 This is a small bug fix release that fixes a bug related to the scoping of
1016 flags in a regex. Namely, before this fix, a regex like `((?i)a)b)` would
1017 match `aB` despite the fact that `b` should not be matched case insensitively.
1018
1019 Bug fixes:
1020
1021 * [BUG #640](https://github.com/rust-lang/regex/issues/640):
1022 Fix bug related to the scoping of flags in a regex.
1023
1024
1025 1.3.3 (2020-01-09)
1026 ==================
1027 This is a small maintenance release that upgrades the dependency on
1028 `thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains
1029 at Rust 1.28.
1030
1031
1032 1.3.2 (2020-01-09)
1033 ==================
1034 This is a small maintenance release with some house cleaning and bug fixes.
1035
1036 New features:
1037
1038 * [FEATURE #631](https://github.com/rust-lang/regex/issues/631):
1039 Add a `Match::range` method an a `From<Match> for Range` impl.
1040
1041 Bug fixes:
1042
1043 * [BUG #521](https://github.com/rust-lang/regex/issues/521):
1044 Corrects `/-/.splitn("a", 2)` to return `["a"]` instead of `["a", ""]`.
1045 * [BUG #594](https://github.com/rust-lang/regex/pull/594):
1046 Improve error reporting when writing `\p\`.
1047 * [BUG #627](https://github.com/rust-lang/regex/issues/627):
1048 Corrects `/-/.split("a-")` to return `["a", ""]` instead of `["a"]`.
1049 * [BUG #633](https://github.com/rust-lang/regex/pull/633):
1050 Squash deprecation warnings for the `std::error::Error::description` method.
1051
1052
1053 1.3.1 (2019-09-04)
1054 ==================
1055 This is a maintenance release with no changes in order to try to work around
1056 a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400).
1057
1058
1059 1.3.0 (2019-09-03)
1060 ==================
1061 This release adds a plethora of new crate features that permit users of regex
1062 to shrink its size considerably, in exchange for giving up either functionality
1063 (such as Unicode support) or runtime performance. When all such features are
1064 disabled, the dependency tree for `regex` shrinks to exactly 1 crate
1065 (`regex-syntax`). More information about the new crate features can be
1066 [found in the docs](https://docs.rs/regex/*/#crate-features).
1067
1068 Note that while this is a new minor version release, the minimum supported
1069 Rust version for this crate remains at `1.28.0`.
1070
1071 New features:
1072
1073 * [FEATURE #474](https://github.com/rust-lang/regex/issues/474):
1074 The `use_std` feature has been deprecated in favor of the `std` feature.
1075 The `use_std` feature will be removed in regex 2. Until then, `use_std` will
1076 remain as an alias for the `std` feature.
1077 * [FEATURE #583](https://github.com/rust-lang/regex/issues/583):
1078 Add a substantial number of crate features shrinking `regex`.
1079
1080
1081 1.2.1 (2019-08-03)
1082 ==================
1083 This release does a bit of house cleaning. Namely:
1084
1085 * This repository is now using rustfmt.
1086 * License headers have been removed from all files, in following suit with the
1087 Rust project.
1088 * Teddy has been removed from the `regex` crate, and is now part of the
1089 `aho-corasick` crate.
1090 [See `aho-corasick`'s new `packed` submodule for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html).
1091 * The `utf8-ranges` crate has been deprecated, with its functionality moving
1092 into the
1093 [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html).
1094 * The `ucd-util` dependency has been dropped, in favor of implementing what
1095 little we need inside of `regex-syntax` itself.
1096
1097 In general, this is part of an ongoing (long term) effort to make optimizations
1098 in the regex engine easier to reason about. The current code is too convoluted,
1099 and thus it is very easy to introduce new bugs. This simplification effort is
1100 the primary motivation behind re-working the `aho-corasick` crate to not only
1101 bundle algorithms like Teddy, but to also provide regex-like match semantics
1102 automatically.
1103
1104 Moving forward, the plan is to join up with the `bstr` and `regex-automata`
1105 crates, with the former providing more sophisticated substring search
1106 algorithms (thereby deleting existing code in `regex`) and the latter providing
1107 ahead-of-time compiled DFAs for cases where they are inexpensive to compute.
1108
1109
1110 1.2.0 (2019-07-20)
1111 ==================
1112 This release updates regex's minimum supported Rust version to 1.28, which was
1113 release almost 1 year ago. This release also updates regex's Unicode data
1114 tables to 12.1.0.
1115
1116
1117 1.1.9 (2019-07-06)
1118 ==================
1119 This release contains a bug fix that caused regex's tests to fail, due to a
1120 dependency on an unreleased behavior in regex-syntax.
1121
1122 * [BUG #593](https://github.com/rust-lang/regex/issues/593):
1123 Move an integration-style test on error messages into regex-syntax.
1124
1125
1126 1.1.8 (2019-07-04)
1127 ==================
1128 This release contains a few small internal refactorings. One of which fixes
1129 an instance of undefined behavior in a part of the SIMD code.
1130
1131 Bug fixes:
1132
1133 * [BUG #545](https://github.com/rust-lang/regex/issues/545):
1134 Improves error messages when a repetition operator is used without a number.
1135 * [BUG #588](https://github.com/rust-lang/regex/issues/588):
1136 Removes use of a repr(Rust) union used for type punning in the Teddy matcher.
1137 * [BUG #591](https://github.com/rust-lang/regex/issues/591):
1138 Update docs for running benchmarks and improve failure modes.
1139
1140
1141 1.1.7 (2019-06-09)
1142 ==================
1143 This release fixes up a few warnings as a result of recent deprecations.
1144
1145
1146 1.1.6 (2019-04-16)
1147 ==================
1148 This release fixes a regression introduced by a bug fix (for
1149 [BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause
1150 the regex engine to enter an infinite loop. This bug was originally
1151 [reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247).
1152
1153
1154 1.1.5 (2019-04-01)
1155 ==================
1156 This release fixes a bug in regex's dependency specification where it requires
1157 a newer version of regex-syntax, but this wasn't communicated correctly in the
1158 Cargo.toml. This would have been caught by a minimal version check, but this
1159 check was disabled because the `rand` crate itself advertises incorrect
1160 dependency specifications.
1161
1162 Bug fixes:
1163
1164 * [BUG #570](https://github.com/rust-lang/regex/pull/570):
1165 Fix regex-syntax minimal version.
1166
1167
1168 1.1.4 (2019-03-31)
1169 ==================
1170 This release fixes a backwards compatibility regression where Regex was no
1171 longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose
1172 AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick
1173 0.7.4, which we now require.
1174
1175 Bug fixes:
1176
1177 * [BUG #568](https://github.com/rust-lang/regex/pull/568):
1178 Fix an API regression where Regex was no longer UnwindSafe.
1179
1180
1181 1.1.3 (2019-03-30)
1182 ==================
1183 This releases fixes a few bugs and adds a performance improvement when a regex
1184 is a simple alternation of literals.
1185
1186 Performance improvements:
1187
1188 * [OPT #566](https://github.com/rust-lang/regex/pull/566):
1189 Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes.
1190
1191 Bug fixes:
1192
1193 * [BUG #527](https://github.com/rust-lang/regex/issues/527):
1194 Fix a bug where the parser would panic on patterns like `((?x))`.
1195 * [BUG #555](https://github.com/rust-lang/regex/issues/555):
1196 Fix a bug where the parser would panic on patterns like `(?m){1,1}`.
1197 * [BUG #557](https://github.com/rust-lang/regex/issues/557):
1198 Fix a bug where captures could lead to an incorrect match.
1199
1200
1201 1.1.2 (2019-02-27)
1202 ==================
1203 This release fixes a bug found in the fix introduced in 1.1.1.
1204
1205 Bug fixes:
1206
1207 * [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f):
1208 Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release.
1209
1210
1211 1.1.1 (2019-02-27)
1212 ==================
1213 This is a small release with one fix for a bug caused by literal optimizations.
1214
1215 Bug fixes:
1216
1217 * [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d):
1218 Fixes a bug in the reverse suffix literal optimization. This was originally
1219 reported
1220 [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203).
1221
1222
1223 1.1.0 (2018-11-30)
1224 ==================
1225 This is a small release with a couple small enhancements. This release also
1226 increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In
1227 accordance with this crate's MSRV policy, this release bumps the minor version
1228 number.
1229
1230 Performance improvements:
1231
1232 * [OPT #511](https://github.com/rust-lang/regex/pull/511),
1233 [OPT #540](https://github.com/rust-lang/regex/pull/540):
1234 Improve lazy DFA construction for large regex sets.
1235
1236 New features:
1237
1238 * [FEATURE #538](https://github.com/rust-lang/regex/pull/538):
1239 Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md).
1240
1241 Bug fixes:
1242
1243 * [BUG #530](https://github.com/rust-lang/regex/pull/530):
1244 Add Unicode license (for data tables).
1245 * Various typo/doc fixups.
1246
1247
1248 1.0.6 (2018-11-06)
1249 ==================
1250 This is a small release.
1251
1252 Performance improvements:
1253
1254 * [OPT #513](https://github.com/rust-lang/regex/pull/513):
1255 Improve performance of compiling large Unicode classes by 8-10%.
1256
1257 Bug fixes:
1258
1259 * [BUG #533](https://github.com/rust-lang/regex/issues/533):
1260 Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`.
1261
1262
1263 1.0.5 (2018-09-06)
1264 ==================
1265 This is a small release with an API enhancement.
1266
1267 New features:
1268
1269 * [FEATURE #509](https://github.com/rust-lang/regex/pull/509):
1270 Generalize impls of the `Replacer` trait.
1271
1272
1273 1.0.4 (2018-08-25)
1274 ==================
1275 This is a small release that bumps the quickcheck dependency.
1276
1277
1278 1.0.3 (2018-08-24)
1279 ==================
1280 This is a small bug fix release.
1281
1282 Bug fixes:
1283
1284 * [BUG #504](https://github.com/rust-lang/regex/pull/504):
1285 Fix for Cargo's "minimal version" support.
1286 * [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f):
1287 Fix doc examples for byte regexes.
1288
1289
1290 1.0.2 (2018-07-18)
1291 ==================
1292 This release exposes some new lower level APIs on `Regex` that permit
1293 amortizing allocation and controlling the location at which a search is
1294 performed in a more granular way. Most users of the regex crate will not
1295 need or want to use these APIs.
1296
1297 New features:
1298
1299 * [FEATURE #493](https://github.com/rust-lang/regex/pull/493):
1300 Add a few lower level APIs for amortizing allocation and more fine-grained
1301 searching.
1302
1303 Bug fixes:
1304
1305 * [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad):
1306 Correct outdated documentation on `RegexBuilder::dot_matches_new_line`.
1307 * [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0):
1308 Correct outdated documentation on `Parser::allow_invalid_utf8` in the
1309 `regex-syntax` crate.
1310 * [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b):
1311 Fix a bug in the HIR printer where it wouldn't correctly escape meta
1312 characters in character classes.
1313
1314
1315 1.0.1 (2018-06-19)
1316 ==================
1317 This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD
1318 optimizations automatically on Rust stable (1.27 or newer).
1319
1320 New features:
1321
1322 * [FEATURE #486](https://github.com/rust-lang/regex/pull/486):
1323 Implement `size_hint` on `RegexSet` match iterators.
1324 * [FEATURE #488](https://github.com/rust-lang/regex/pull/488):
1325 Update Unicode tables for Unicode 11.
1326 * [FEATURE #490](https://github.com/rust-lang/regex/pull/490):
1327 SIMD optimizations are now enabled automatically in Rust stable, for versions
1328 1.27 and up. No compilation flags or features need to be set. CPU support
1329 SIMD is detected automatically at runtime.
1330
1331 Bug fixes:
1332
1333 * [BUG #482](https://github.com/rust-lang/regex/pull/482):
1334 Present a better compilation error when the `use_std` feature isn't used.
1335
1336
1337 1.0.0 (2018-05-01)
1338 ==================
1339 This release marks the 1.0 release of regex.
1340
1341 While this release includes some breaking changes, most users of older versions
1342 of the regex library should be able to migrate to 1.0 by simply bumping the
1343 version number. The important changes are as follows:
1344
1345 * We adopt Rust 1.20 as the new minimum supported version of Rust for regex.
1346 We also tentatively adopt a policy that permits bumping the minimum supported
1347 version of Rust in minor version releases of regex, but no patch releases.
1348 That is, with respect to semver, we do not strictly consider bumping the
1349 minimum version of Rust to be a breaking change, but adopt a conservative
1350 stance as a compromise.
1351 * Octal syntax in regular expressions has been disabled by default. This
1352 permits better error messages that inform users that backreferences aren't
1353 available. Octal syntax can be re-enabled via the corresponding option on
1354 `RegexBuilder`.
1355 * `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at
1356 invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode
1357 regexes.
1358 * The `From<regex_syntax::Error>` impl has been removed. This formally removes
1359 the public dependency on `regex-syntax`.
1360 * A new feature, `use_std`, has been added and enabled by default. Disabling
1361 the feature will result in a compilation error. In the future, this may
1362 permit us to support `no_std` environments (w/ `alloc`) in a backwards
1363 compatible way.
1364
1365 For more information and discussion, please see
1366 [1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457).
1367
1368
1369 0.2.11 (2018-05-01)
1370 ===================
1371 This release primarily contains bug fixes. Some of them resolve bugs where
1372 the parser could panic.
1373
1374 New features:
1375
1376 * [FEATURE #459](https://github.com/rust-lang/regex/pull/459):
1377 Include C++'s standard regex library and Boost's regex library in the
1378 benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma,
1379 PCRE1, PCRE2, RE2 and Tcl in the harness.
1380
1381 Bug fixes:
1382
1383 * [BUG #445](https://github.com/rust-lang/regex/issues/445):
1384 Clarify order of indices returned by RegexSet match iterator.
1385 * [BUG #461](https://github.com/rust-lang/regex/issues/461):
1386 Improve error messages for invalid regexes like `[\d-a]`.
1387 * [BUG #464](https://github.com/rust-lang/regex/issues/464):
1388 Fix a bug in the error message pretty printer that could cause a panic when
1389 a regex contained a literal `\n` character.
1390 * [BUG #465](https://github.com/rust-lang/regex/issues/465):
1391 Fix a panic in the parser that was caused by applying a repetition operator
1392 to `(?flags)`.
1393 * [BUG #466](https://github.com/rust-lang/regex/issues/466):
1394 Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`.
1395 * [BUG #470](https://github.com/rust-lang/regex/pull/470):
1396 Fix a bug where literal searches did more work than necessary for anchored
1397 regexes.
1398
1399
1400 0.2.10 (2018-03-16)
1401 ===================
1402 This release primarily updates the regex crate to changes made in `std::arch`
1403 on nightly Rust.
1404
1405 New features:
1406
1407 * [FEATURE #458](https://github.com/rust-lang/regex/pull/458):
1408 The `Hir` type in `regex-syntax` now has a printer.
1409
1410
1411 0.2.9 (2018-03-12)
1412 ==================
1413 This release introduces a new nightly only feature, `unstable`, which enables
1414 SIMD optimizations for certain types of regexes. No additional compile time
1415 options are necessary, and the regex crate will automatically choose the
1416 best CPU features at run time. As a result, the `simd` (nightly only) crate
1417 dependency has been dropped.
1418
1419 New features:
1420
1421 * [FEATURE #456](https://github.com/rust-lang/regex/pull/456):
1422 The regex crate now includes AVX2 optimizations in addition to the extant
1423 SSSE3 optimization.
1424
1425 Bug fixes:
1426
1427 * [BUG #455](https://github.com/rust-lang/regex/pull/455):
1428 Fix a bug where `(?x)[ / - ]` failed to parse.
1429
1430
1431 0.2.8 (2018-03-12)
1432 ==================
1433 Bug fixes:
1434
1435 * [BUG #454](https://github.com/rust-lang/regex/pull/454):
1436 Fix a bug in the nest limit checker being too aggressive.
1437
1438
1439 0.2.7 (2018-03-07)
1440 ==================
1441 This release includes a ground-up rewrite of the regex-syntax crate, which has
1442 been in development for over a year.
1443 731
1444 New features:
1445
1446 * Error messages for invalid regexes have been greatly improved. You get these
1447 automatically; you don't need to do anything. In addition to better
1448 formatting, error messages will now explicitly call out the use of look
1449 around. When regex 1.0 is released, this will happen for backreferences as
1450 well.
1451 * Full support for intersection, difference and symmetric difference of
1452 character classes. These can be used via the `&&`, `--` and `~~` binary
1453 operators within classes.
1454 * A Unicode Level 1 conformant implementation of `\p{..}` character classes.
1455 Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}`
1456 now work. All property name and value aliases are supported, and properties
1457 are selected via loose matching. e.g., `\p{Greek}` is the same as
1458 `\p{G r E e K}`.
1459 * A new `UNICODE.md` document has been added to this repository that
1460 exhaustively documents support for UTS#18.
1461 * Empty sub-expressions are now permitted in most places. That is, `()+` is
1462 now a valid regex.
1463 * Almost everything in regex-syntax now uses constant stack space, even when
1464 performing analysis that requires structural induction. This reduces the risk
1465 of a user provided regular expression causing a stack overflow.
1466 * [FEATURE #174](https://github.com/rust-lang/regex/issues/174):
1467 The `Ast` type in `regex-syntax` now contains span information.
1468 * [FEATURE #424](https://github.com/rust-lang/regex/issues/424):
1469 Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points
1470 in a regular expression.
1471 * [FEATURE #449](https://github.com/rust-lang/regex/pull/449):
1472 Add a `Replace::by_ref` adapter for use of a replacer without consuming it.
1473
1474 Bug fixes:
1475
1476 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
1477 We re-enable the Boyer-Moore literal matcher.
1478
1479
1480 0.2.6 (2018-02-08)
1481 ==================
1482 Bug fixes:
1483
1484 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
1485 Fixes a bug in the new Boyer-Moore searcher that results in a match failure.
1486 We fix this bug by temporarily disabling Boyer-Moore.
1487
1488
1489 0.2.5 (2017-12-30)
1490 ==================
1491 Bug fixes:
1492
1493 * [BUG #437](https://github.com/rust-lang/regex/issues/437):
1494 Fixes a bug in the new Boyer-Moore searcher that results in a panic.
1495
1496
1497 0.2.4 (2017-12-30)
1498 ==================
1499 New features:
1500
1501 * [FEATURE #348](https://github.com/rust-lang/regex/pull/348):
1502 Improve performance for capture searches on anchored regex.
1503 (Contributed by @ethanpailes. Nice work!)
1504 * [FEATURE #419](https://github.com/rust-lang/regex/pull/419):
1505 Expand literal searching to include Tuned Boyer-Moore in some cases.
1506 (Contributed by @ethanpailes. Nice work!)
1507
1508 Bug fixes:
1509
1510 * [BUG](https://github.com/rust-lang/regex/pull/436):
1511 The regex compiler plugin has been removed.
1512 * [BUG](https://github.com/rust-lang/regex/pull/436):
1513 `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error.
1514 * [BUG](https://github.com/rust-lang/regex/pull/436):
1515 Bring the benchmark harness up to date.
1516
1517
1518 0.2.3 (2017-11-30)
1519 ==================
1520 New features:
1521
1522 * [FEATURE #374](https://github.com/rust-lang/regex/pull/374):
1523 Add `impl From<Match> for &str`.
1524 * [FEATURE #380](https://github.com/rust-lang/regex/pull/380):
1525 Derive `Clone` and `PartialEq` on `Error`.
1526 * [FEATURE #400](https://github.com/rust-lang/regex/pull/400):
1527 Update to Unicode 10.
1528
1529 Bug fixes:
1530
1531 * [BUG #375](https://github.com/rust-lang/regex/issues/375):
1532 Fix a bug that prevented the bounded backtracker from terminating.
1533 * [BUG #393](https://github.com/rust-lang/regex/issues/393),
1534 [BUG #394](https://github.com/rust-lang/regex/issues/394):
1535 Fix bug with `replace` methods for empty matches.
1536
1537
1538 0.2.2 (2017-05-21)
1539 ==================
1540 New features:
1541
1542 * [FEATURE #341](https://github.com/rust-lang/regex/issues/341):
1543 Support nested character classes and intersection operation.
1544 For example, `[\p{Greek}&&\pL]` matches greek letters and
1545 `[[0-9]&&[^4]]` matches every decimal digit except `4`.
1546 (Much thanks to @robinst, who contributed this awesome feature.)
1547
1548 Bug fixes:
1549
1550 * [BUG #321](https://github.com/rust-lang/regex/issues/321):
1551 Fix bug in literal extraction and UTF-8 decoding.
1552 * [BUG #326](https://github.com/rust-lang/regex/issues/326):
1553 Add documentation tip about the `(?x)` flag.
1554 * [BUG #333](https://github.com/rust-lang/regex/issues/333):
1555 Show additional replacement example using curly braces.
1556 * [BUG #334](https://github.com/rust-lang/regex/issues/334):
1557 Fix bug when resolving captures after a match.
1558 * [BUG #338](https://github.com/rust-lang/regex/issues/338):
1559 Add example that uses `Captures::get` to API documentation.
1560 * [BUG #353](https://github.com/rust-lang/regex/issues/353):
1561 Fix RegexSet bug that caused match failure in some cases.
1562 * [BUG #354](https://github.com/rust-lang/regex/pull/354):
1563 Fix panic in parser when `(?x)` is used.
1564 * [BUG #358](https://github.com/rust-lang/regex/issues/358):
1565 Fix literal optimization bug with RegexSet.
1566 * [BUG #359](https://github.com/rust-lang/regex/issues/359):
1567 Fix example code in README.
1568 * [BUG #365](https://github.com/rust-lang/regex/pull/365):
1569 Fix bug in `rure_captures_len` in the C binding.
1570 * [BUG #367](https://github.com/rust-lang/regex/issues/367):
1571 Fix byte class bug that caused a panic.
1572
1573
1574 0.2.1
1575 =====
1576 One major bug with `replace_all` has been fixed along with a couple of other
1577 touch-ups.
1578
1579 * [BUG #312](https://github.com/rust-lang/regex/issues/312):
1580 Fix documentation for `NoExpand` to reference correct lifetime parameter.
1581 * [BUG #314](https://github.com/rust-lang/regex/issues/314):
1582 Fix a bug with `replace_all` when replacing a match with the empty string.
1583 * [BUG #316](https://github.com/rust-lang/regex/issues/316):
1584 Note a missing breaking change from the `0.2.0` CHANGELOG entry.
1585 (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
1586 * [BUG #324](https://github.com/rust-lang/regex/issues/324):
1587 Compiling `regex` should only require one version of `memchr` crate.
1588
1589
1590 0.2.0
1591 =====
1592 This is a new major release of the regex crate, and is an implementation of the
1593 [regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
1594 We are releasing a `0.2` first, and if there are no major problems, we will
1595 release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
1596 1.12.
1597
1598 There are a number of **breaking changes** in `0.2`. They are split into two
1599 types. The first type correspond to breaking changes in regular expression
1600 syntax. The second type correspond to breaking changes in the API.
1601
1602 Breaking changes for regex syntax:
1603
1604 * POSIX character classes now require double bracketing. Previously, the regex
1605 `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
1606 as the character class containing the characters `:upper:`. The fix to this
1607 change is to use `[[:upper:]]` instead. Note that variants like
1608 `[[:upper:][:blank:]]` continue to work.
1609 * The character `[` must always be escaped inside a character class.
1610 * The characters `&`, `-` and `~` must be escaped if any one of them are
1611 repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
1612 equivalent while `[&&]` is illegal. (The motivation for this and the prior
1613 change is to provide a backwards compatible path for adding character class
1614 set notation.)
1615 * A `bytes::Regex` now has Unicode mode enabled by default (like the main
1616 `Regex` type). This means regexes compiled with `bytes::Regex::new` that
1617 don't have the Unicode flag set should add `(?-u)` to recover the original
1618 behavior.
1619
1620 Breaking changes for the regex API:
1621
1622 * `find` and `find_iter` now **return `Match` values instead of
1623 `(usize, usize)`.** `Match` values have `start` and `end` methods, which
1624 return the match offsets. `Match` values also have an `as_str` method,
1625 which returns the text of the match itself.
1626 * The `Captures` type now only provides a single iterator over all capturing
1627 matches, which should replace uses of `iter` and `iter_pos`. Uses of
1628 `iter_named` should use the `capture_names` method on `Regex`.
1629 * The `at` method on the `Captures` type has been renamed to `get`, and it
1630 now returns a `Match`. Similarly, the `name` method on `Captures` now returns
1631 a `Match`.
1632 * The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
1633 is returned when no replacements are made.
1634 * The `Replacer` trait has been completely overhauled. This should only
1635 impact clients that implement this trait explicitly. Standard uses of
1636 the `replace` methods should continue to work unchanged. If you implement
1637 the `Replacer` trait, please consult the new documentation.
1638 * The `quote` free function has been renamed to `escape`.
1639 * The `Regex::with_size_limit` method has been removed. It is replaced by
1640 `RegexBuilder::size_limit`.
1641 * The `RegexBuilder` type has switched from owned `self` method receivers to
1642 `&mut self` method receivers. Most uses will continue to work unchanged, but
1643 some code may require naming an intermediate variable to hold the builder.
1644 * The `compile` method on `RegexBuilder` has been renamed to `build`.
1645 * The free `is_match` function has been removed. It is replaced by compiling
1646 a `Regex` and calling its `is_match` method.
1647 * The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
1648 on these impls, the fix is to define a wrapper type around `Regex`, impl
1649 `Deref` on it and provide the necessary impls.
1650 * The `is_empty` method on `Captures` has been removed. This always returns
1651 `false`, so its use is superfluous.
1652 * The `Syntax` variant of the `Error` type now contains a string instead of
1653 a `regex_syntax::Error`. If you were examining syntax errors more closely,
1654 you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
1655 * The `InvalidSet` variant of the `Error` type has been removed since it is
1656 no longer used.
1657 * Most of the iterator types have been renamed to match conventions. If you
1658 were using these iterator types explicitly, please consult the documentation
1659 for its new name. For example, `RegexSplits` has been renamed to `Split`.
1660
1661 A number of bugs have been fixed:
1662
1663 * [BUG #151](https://github.com/rust-lang/regex/issues/151):
1664 The `Replacer` trait has been changed to permit the caller to control
1665 allocation.
1666 * [BUG #165](https://github.com/rust-lang/regex/issues/165):
1667 Remove the free `is_match` function.
1668 * [BUG #166](https://github.com/rust-lang/regex/issues/166):
1669 Expose more knobs (available in `0.1`) and remove `with_size_limit`.
1670 * [BUG #168](https://github.com/rust-lang/regex/issues/168):
1671 Iterators produced by `Captures` now have the correct lifetime parameters.
1672 * [BUG #175](https://github.com/rust-lang/regex/issues/175):
1673 Fix a corner case in the parsing of POSIX character classes.
1674 * [BUG #178](https://github.com/rust-lang/regex/issues/178):
1675 Drop the `PartialEq` and `Eq` impls on `Regex`.
1676 * [BUG #179](https://github.com/rust-lang/regex/issues/179):
1677 Remove `is_empty` from `Captures` since it always returns false.
1678 * [BUG #276](https://github.com/rust-lang/regex/issues/276):
1679 Position of named capture can now be retrieved from a `Captures`.
1680 * [BUG #296](https://github.com/rust-lang/regex/issues/296):
1681 Remove winapi/kernel32-sys dependency on UNIX.
1682 * [BUG #307](https://github.com/rust-lang/regex/issues/307):
1683 Fix error on emscripten.
1684
1685
1686 0.1.80
1687 ======
1688 * [PR #292](https://github.com/rust-lang/regex/pull/292):
1689 Fixes bug #291, which was introduced by PR #290.
1690
1691 0.1.79
1692 ======
1693 * Require regex-syntax 0.3.8.
1694
1695 0.1.78
1696 ======
1697 * [PR #290](https://github.com/rust-lang/regex/pull/290):
1698 Fixes bug #289, which caused some regexes with a certain combination
1699 of literals to match incorrectly.
1700
1701 0.1.77
1702 ======
1703 * [PR #281](https://github.com/rust-lang/regex/pull/281):
1704 Fixes bug #280 by disabling all literal optimizations when a pattern
1705 is partially anchored.
1706
1707 0.1.76
1708 ======
1709 * Tweak criteria for using the Teddy literal matcher.
1710
1711 0.1.75
1712 ======
1713 * [PR #275](https://github.com/rust-lang/regex/pull/275):
1714 Improves match verification performance in the Teddy SIMD searcher.
1715 * [PR #278](https://github.com/rust-lang/regex/pull/278):
1716 Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
1717 * Implemented DoubleEndedIterator on regex set match iterators.
1718
1719 0.1.74
1720 ======
1721 * Release regex-syntax 0.3.5 with a minor bug fix.
1722 * Fix bug #272.
1723 * Fix bug #277.
1724 * [PR #270](https://github.com/rust-lang/regex/pull/270):
1725 Fixes bugs #264, #268 and an unreported where the DFA cache size could be
1726 drastically underestimated in some cases (leading to high unexpected memory
1727 usage).
1728
1729 0.1.73
1730 ======
1731 * Release `regex-syntax 0.3.4`.
1732 * Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
1733
1734 0.1.72
1735 ======
1736 * [PR #262](https://github.com/rust-lang/regex/pull/262):
1737 Fixes a number of small bugs caught by fuzz testing (AFL).
1738
1739 0.1.71
1740 ======
1741 * [PR #236](https://github.com/rust-lang/regex/pull/236):
1742 Fix a bug in how suffix literals were extracted, which could lead
1743 to invalid match behavior in some cases.
1744
1745 0.1.70
1746 ======
1747 * [PR #231](https://github.com/rust-lang/regex/pull/231):
1748 Add SIMD accelerated multiple pattern search.
1749 * [PR #228](https://github.com/rust-lang/regex/pull/228):
1750 Reintroduce the reverse suffix literal optimization.
1751 * [PR #226](https://github.com/rust-lang/regex/pull/226):
1752 Implements NFA state compression in the lazy DFA.
1753 * [PR #223](https://github.com/rust-lang/regex/pull/223):
1754 A fully anchored RegexSet can now short-circuit.
1755
1756 0.1.69
1757 ======
1758 * [PR #216](https://github.com/rust-lang/regex/pull/216):
1759 Tweak the threshold for running backtracking.
1760 * [PR #217](https://github.com/rust-lang/regex/pull/217):
1761 Add upper limit (from the DFA) to capture search (for the NFA).
1762 * [PR #218](https://github.com/rust-lang/regex/pull/218):
1763 Add rure, a C API.
1764
1765 0.1.68
1766 ======
1767 * [PR #210](https://github.com/rust-lang/regex/pull/210):
1768 Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
1769 instead of `extend_from_slice`.
1770 * [PR #211](https://github.com/rust-lang/regex/pull/211):
1771 Fixed a bug in the handling of word boundaries in the DFA.
1772 * [PR #213](https://github.com/rust-lang/pull/213):
1773 Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
1774 running regexes using any of the following regex engines: PCRE1, PCRE2,
1775 Oniguruma, RE2, Tcl and of course Rust's own regexes.
1776
1777 0.1.67
1778 ======
1779 * [PR #201](https://github.com/rust-lang/regex/pull/201):
1780 Fix undefined behavior in the `regex!` compiler plugin macro.
1781 * [PR #205](https://github.com/rust-lang/regex/pull/205):
1782 More improvements to DFA performance. Competitive with RE2. See PR for
1783 benchmarks.
1784 * [PR #209](https://github.com/rust-lang/regex/pull/209):
1785 Release 0.1.66 was semver incompatible since it required a newer version
1786 of Rust than previous releases. This PR fixes that. (And `0.1.66` was
1787 yanked.)
1788
1789 0.1.66
1790 ======
1791 * Speculative support for Unicode word boundaries was added to the DFA. This
1792 should remove the last common case that disqualified use of the DFA.
1793 * An optimization that scanned for suffix literals and then matched the regular
1794 expression in reverse was removed because it had worst case quadratic time
1795 complexity. It was replaced with a more limited optimization where, given any
1796 regex of the form `re$`, it will be matched in reverse from the end of the
1797 haystack.
1798 * [PR #202](https://github.com/rust-lang/regex/pull/202):
1799 The inner loop of the DFA was heavily optimized to improve cache locality
1800 and reduce the overall number of instructions run on each iteration. This
1801 represents the first use of `unsafe` in `regex` (to elide bounds checks).
1802 * [PR #200](https://github.com/rust-lang/regex/pull/200):
1803 Use of the `mempool` crate (which used thread local storage) was replaced
1804 with a faster version of a similar API in @Amanieu's `thread_local` crate.
1805 It should reduce contention when using a regex from multiple threads
1806 simultaneously.
1807 * PCRE2 JIT benchmarks were added. A benchmark comparison can be found
1808 [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
1809 (Includes a comparison with PCRE1's JIT and Oniguruma.)
1810 * A bug where word boundaries weren't being matched correctly in the DFA was
1811 fixed. This only affected use of `bytes::Regex`.
1812 * [#160](https://github.com/rust-lang/regex/issues/160):
1813 `Captures` now has a `Debug` impl.