• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
11.7.1 (2023-01-09)
2==================
3This release was done principally to try and fix the doc.rs rendering for the
4regex crate.
5
6Performance improvements:
7
8* [PERF #930](https://github.com/rust-lang/regex/pull/930):
9  Optimize `replacen`. This also applies to `replace`, but not `replace_all`.
10
11Bug fixes:
12
13* [BUG #945](https://github.com/rust-lang/regex/issues/945):
14  Maybe fix rustdoc rendering by just bumping a new release?
15
16
171.7.0 (2022-11-05)
18==================
19This release principally includes an upgrade to Unicode 15.
20
21New features:
22
23* [FEATURE #832](https://github.com/rust-lang/regex/issues/916):
24  Upgrade to Unicode 15.
25
26
271.6.0 (2022-07-05)
28==================
29This release principally includes an upgrade to Unicode 14.
30
31New features:
32
33* [FEATURE #832](https://github.com/rust-lang/regex/pull/832):
34  Clarify that `Captures::len` includes all groups, not just matching groups.
35* [FEATURE #857](https://github.com/rust-lang/regex/pull/857):
36  Add an `ExactSizeIterator` impl for `SubCaptureMatches`.
37* [FEATURE #861](https://github.com/rust-lang/regex/pull/861):
38  Improve `RegexSet` documentation examples.
39* [FEATURE #877](https://github.com/rust-lang/regex/issues/877):
40  Upgrade to Unicode 14.
41
42Bug fixes:
43
44* [BUG #792](https://github.com/rust-lang/regex/issues/792):
45  Fix error message rendering bug.
46
47
481.5.6 (2022-05-20)
49==================
50This release includes a few bug fixes, including a bug that produced incorrect
51matches when a non-greedy `?` operator was used.
52
53* [BUG #680](https://github.com/rust-lang/regex/issues/680):
54  Fixes a bug where `[[:alnum:][:^ascii:]]` dropped `[:alnum:]` from the class.
55* [BUG #859](https://github.com/rust-lang/regex/issues/859):
56  Fixes a bug where `Hir::is_match_empty` returned `false` for `\b`.
57* [BUG #862](https://github.com/rust-lang/regex/issues/862):
58  Fixes a bug where 'ab??' matches 'ab' instead of 'a' in 'ab'.
59
60
611.5.5 (2022-03-08)
62==================
63This releases fixes a security bug in the regex compiler. This bug permits a
64vector for a denial-of-service attack in cases where the regex being compiled
65is untrusted. There are no known problems where the regex is itself trusted,
66including in cases of untrusted haystacks.
67
68* [SECURITY #GHSA-m5pq-gvj9-9vr8](https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8):
69  Fixes a bug in the regex compiler where empty sub-expressions subverted the
70  existing mitigations in place to enforce a size limit on compiled regexes.
71  The Rust Security Response WG published an advisory about this:
72  https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw
73
74
751.5.4 (2021-05-06)
76==================
77This release fixes another compilation failure when building regex. This time,
78the fix is for when the `pattern` feature is enabled, which only works on
79nightly Rust. CI has been updated to test this case.
80
81* [BUG #772](https://github.com/rust-lang/regex/pull/772):
82  Fix build when `pattern` feature is enabled.
83
84
851.5.3 (2021-05-01)
86==================
87This releases fixes a bug when building regex with only the `unicode-perl`
88feature. It turns out that while CI was building this configuration, it wasn't
89actually failing the overall build on a failed compilation.
90
91* [BUG #769](https://github.com/rust-lang/regex/issues/769):
92  Fix build in `regex-syntax` when only the `unicode-perl` feature is enabled.
93
94
951.5.2 (2021-05-01)
96==================
97This release fixes a performance bug when Unicode word boundaries are used.
98Namely, for certain regexes on certain inputs, it's possible for the lazy DFA
99to stop searching (causing a fallback to a slower engine) when it doesn't
100actually need to.
101
102[PR #768](https://github.com/rust-lang/regex/pull/768) fixes the bug, which was
103originally reported in
104[ripgrep#1860](https://github.com/BurntSushi/ripgrep/issues/1860).
105
106
1071.5.1 (2021-04-30)
108==================
109This is a patch release that fixes a compilation error when the `perf-literal`
110feature is not enabled.
111
112
1131.5.0 (2021-04-30)
114==================
115This release primarily updates to Rust 2018 (finally) and bumps the MSRV to
116Rust 1.41 (from Rust 1.28). Rust 1.41 was chosen because it's still reasonably
117old, and is what's in Debian stable at the time of writing.
118
119This release also drops this crate's own bespoke substring search algorithms
120in favor of a new
121[`memmem` implementation provided by the `memchr` crate](https://docs.rs/memchr/2.4.0/memchr/memmem/index.html).
122This will change the performance profile of some regexes, sometimes getting a
123little worse, and hopefully more frequently, getting a lot better. Please
124report any serious performance regressions if you find them.
125
126
1271.4.6 (2021-04-22)
128==================
129This is a small patch release that fixes the compiler's size check on how much
130heap memory a regex uses. Previously, the compiler did not account for the
131heap usage of Unicode character classes. Now it does. It's possible that this
132may make some regexes fail to compile that previously did compile. If that
133happens, please file an issue.
134
135* [BUG OSS-fuzz#33579](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33579):
136  Some regexes can use more heap memory than one would expect.
137
138
1391.4.5 (2021-03-14)
140==================
141This is a small patch release that fixes a regression in the size of a `Regex`
142in the 1.4.4 release. Prior to 1.4.4, a `Regex` was 552 bytes. In the 1.4.4
143release, it was 856 bytes due to internal changes. In this release, a `Regex`
144is now 16 bytes. In general, the size of a `Regex` was never something that was
145on my radar, but this increased size in the 1.4.4 release seems to have crossed
146a threshold and resulted in stack overflows in some programs.
147
148* [BUG #750](https://github.com/rust-lang/regex/pull/750):
149  Fixes stack overflows seemingly caused by a large `Regex` size by decreasing
150  its size.
151
152
1531.4.4 (2021-03-11)
154==================
155This is a small patch release that contains some bug fixes. Notably, it also
156drops the `thread_local` (and `lazy_static`, via transitivity) dependencies.
157
158Bug fixes:
159
160* [BUG #362](https://github.com/rust-lang/regex/pull/362):
161  Memory leaks caused by an internal caching strategy should now be fixed.
162* [BUG #576](https://github.com/rust-lang/regex/pull/576):
163  All regex types now implement `UnwindSafe` and `RefUnwindSafe`.
164* [BUG #728](https://github.com/rust-lang/regex/pull/749):
165  Add missing `Replacer` impls for `Vec<u8>`, `String`, `Cow`, etc.
166
167
1681.4.3 (2021-01-08)
169==================
170This is a small patch release that adds some missing standard trait
171implementations for some types in the public API.
172
173Bug fixes:
174
175* [BUG #734](https://github.com/rust-lang/regex/pull/734):
176  Add `FusedIterator` and `ExactSizeIterator` impls to iterator types.
177* [BUG #735](https://github.com/rust-lang/regex/pull/735):
178  Add missing `Debug` impls to public API types.
179
180
1811.4.2 (2020-11-01)
182==================
183This is a small bug fix release that bans `\P{any}`. We previously banned empty
184classes like `[^\w\W]`, but missed the `\P{any}` case. In the future, we hope
185to permit empty classes.
186
187* [BUG #722](https://github.com/rust-lang/regex/issues/722):
188  Ban `\P{any}` to avoid a panic in the regex compiler. Found by OSS-Fuzz.
189
190
1911.4.1 (2020-10-13)
192==================
193This is a small bug fix release that makes `\p{cf}` work. Previously, it would
194report "property not found" even though `cf` is a valid abbreviation for the
195`Format` general category.
196
197* [BUG #719](https://github.com/rust-lang/regex/issues/719):
198  Fixes bug that prevented `\p{cf}` from working.
199
200
2011.4.0 (2020-10-11)
202==================
203This releases has a few minor documentation fixes as well as some very minor
204API additions. The MSRV remains at Rust 1.28 for now, but this is intended to
205increase to at least Rust 1.41.1 soon.
206
207This release also adds support for OSS-Fuzz. Kudos to
208[@DavidKorczynski](https://github.com/DavidKorczynski)
209for doing the heavy lifting for that!
210
211New features:
212
213* [FEATURE #649](https://github.com/rust-lang/regex/issues/649):
214  Support `[`, `]` and `.` in capture group names.
215* [FEATURE #687](https://github.com/rust-lang/regex/issues/687):
216  Add `is_empty` predicate to `RegexSet`.
217* [FEATURE #689](https://github.com/rust-lang/regex/issues/689):
218  Implement `Clone` for `SubCaptureMatches`.
219* [FEATURE #715](https://github.com/rust-lang/regex/issues/715):
220  Add `empty` constructor to `RegexSet` for convenience.
221
222Bug fixes:
223
224* [BUG #694](https://github.com/rust-lang/regex/issues/694):
225  Fix doc example for `Replacer::replace_append`.
226* [BUG #698](https://github.com/rust-lang/regex/issues/698):
227  Clarify docs for `s` flag when using a `bytes::Regex`.
228* [BUG #711](https://github.com/rust-lang/regex/issues/711):
229  Clarify `is_match` docs to indicate that it can match anywhere in string.
230
231
2321.3.9 (2020-05-28)
233==================
234This release fixes a MSRV (Minimum Support Rust Version) regression in the
2351.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not
236compile on other Rust versions, such as Rust 1.39.
237
238Bug fixes:
239
240* [BUG #685](https://github.com/rust-lang/regex/issues/685):
241  Remove use of `doc_comment` crate, which cannot be used before Rust 1.43.
242
243
2441.3.8 (2020-05-28)
245==================
246This release contains a couple of important bug fixes driven
247by better support for empty-subexpressions in regexes. For
248example, regexes like `b|` are now allowed. Major thanks to
249[@sliquister](https://github.com/sliquister) for implementing support for this
250in [#677](https://github.com/rust-lang/regex/pull/677).
251
252Bug fixes:
253
254* [BUG #523](https://github.com/rust-lang/regex/pull/523):
255  Add note to documentation that spaces can be escaped in `x` mode.
256* [BUG #524](https://github.com/rust-lang/regex/issues/524):
257  Add support for empty sub-expressions, including empty alternations.
258* [BUG #659](https://github.com/rust-lang/regex/issues/659):
259  Fix match bug caused by an empty sub-expression miscompilation.
260
261
2621.3.7 (2020-04-17)
263==================
264This release contains a small bug fix that fixes how `regex` forwards crate
265features to `regex-syntax`. In particular, this will reduce recompilations in
266some cases.
267
268Bug fixes:
269
270* [BUG #665](https://github.com/rust-lang/regex/pull/665):
271  Fix feature forwarding to `regex-syntax`.
272
273
2741.3.6 (2020-03-24)
275==================
276This release contains a sizable (~30%) performance improvement when compiling
277some kinds of large regular expressions.
278
279Performance improvements:
280
281* [PERF #657](https://github.com/rust-lang/regex/pull/657):
282  Improvement performance of compiling large regular expressions.
283
284
2851.3.5 (2020-03-12)
286==================
287This release updates this crate to Unicode 13.
288
289New features:
290
291* [FEATURE #653](https://github.com/rust-lang/regex/pull/653):
292  Update `regex-syntax` to Unicode 13.
293
294
2951.3.4 (2020-01-30)
296==================
297This is a small bug fix release that fixes a bug related to the scoping of
298flags in a regex. Namely, before this fix, a regex like `((?i)a)b)` would
299match `aB` despite the fact that `b` should not be matched case insensitively.
300
301Bug fixes:
302
303* [BUG #640](https://github.com/rust-lang/regex/issues/640):
304  Fix bug related to the scoping of flags in a regex.
305
306
3071.3.3 (2020-01-09)
308==================
309This is a small maintenance release that upgrades the dependency on
310`thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains
311at Rust 1.28.
312
313
3141.3.2 (2020-01-09)
315==================
316This is a small maintenance release with some house cleaning and bug fixes.
317
318New features:
319
320* [FEATURE #631](https://github.com/rust-lang/regex/issues/631):
321  Add a `Match::range` method an a `From<Match> for Range` impl.
322
323Bug fixes:
324
325* [BUG #521](https://github.com/rust-lang/regex/issues/521):
326  Corrects `/-/.splitn("a", 2)` to return `["a"]` instead of `["a", ""]`.
327* [BUG #594](https://github.com/rust-lang/regex/pull/594):
328  Improve error reporting when writing `\p\`.
329* [BUG #627](https://github.com/rust-lang/regex/issues/627):
330  Corrects `/-/.split("a-")` to return `["a", ""]` instead of `["a"]`.
331* [BUG #633](https://github.com/rust-lang/regex/pull/633):
332  Squash deprecation warnings for the `std::error::Error::description` method.
333
334
3351.3.1 (2019-09-04)
336==================
337This is a maintenance release with no changes in order to try to work-around
338a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400).
339
340
3411.3.0 (2019-09-03)
342==================
343This release adds a plethora of new crate features that permit users of regex
344to shrink its size considerably, in exchange for giving up either functionality
345(such as Unicode support) or runtime performance. When all such features are
346disabled, the dependency tree for `regex` shrinks to exactly 1 crate
347(`regex-syntax`). More information about the new crate features can be
348[found in the docs](https://docs.rs/regex/*/#crate-features).
349
350Note that while this is a new minor version release, the minimum supported
351Rust version for this crate remains at `1.28.0`.
352
353New features:
354
355* [FEATURE #474](https://github.com/rust-lang/regex/issues/474):
356  The `use_std` feature has been deprecated in favor of the `std` feature.
357  The `use_std` feature will be removed in regex 2. Until then, `use_std` will
358  remain as an alias for the `std` feature.
359* [FEATURE #583](https://github.com/rust-lang/regex/issues/583):
360  Add a substantial number of crate features shrinking `regex`.
361
362
3631.2.1 (2019-08-03)
364==================
365This release does a bit of house cleaning. Namely:
366
367* This repository is now using rustfmt.
368* License headers have been removed from all files, in following suit with the
369  Rust project.
370* Teddy has been removed from the `regex` crate, and is now part of the
371  `aho-corasick` crate.
372  [See `aho-corasick`'s new `packed` sub-module for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html).
373* The `utf8-ranges` crate has been deprecated, with its functionality moving
374  into the
375  [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html).
376* The `ucd-util` dependency has been dropped, in favor of implementing what
377  little we need inside of `regex-syntax` itself.
378
379In general, this is part of an ongoing (long term) effort to make optimizations
380in the regex engine easier to reason about. The current code is too convoluted
381and thus it is very easy to introduce new bugs. This simplification effort is
382the primary motivation behind re-working the `aho-corasick` crate to not only
383bundle algorithms like Teddy, but to also provide regex-like match semantics
384automatically.
385
386Moving forward, the plan is to join up with the `bstr` and `regex-automata`
387crates, with the former providing more sophisticated substring search
388algorithms (thereby deleting existing code in `regex`) and the latter providing
389ahead-of-time compiled DFAs for cases where they are inexpensive to compute.
390
391
3921.2.0 (2019-07-20)
393==================
394This release updates regex's minimum supported Rust version to 1.28, which was
395release almost 1 year ago. This release also updates regex's Unicode data
396tables to 12.1.0.
397
398
3991.1.9 (2019-07-06)
400==================
401This release contains a bug fix that caused regex's tests to fail, due to a
402dependency on an unreleased behavior in regex-syntax.
403
404* [BUG #593](https://github.com/rust-lang/regex/issues/593):
405  Move an integration-style test on error messages into regex-syntax.
406
407
4081.1.8 (2019-07-04)
409==================
410This release contains a few small internal refactorings. One of which fixes
411an instance of undefined behavior in a part of the SIMD code.
412
413Bug fixes:
414
415* [BUG #545](https://github.com/rust-lang/regex/issues/545):
416  Improves error messages when a repetition operator is used without a number.
417* [BUG #588](https://github.com/rust-lang/regex/issues/588):
418  Removes use of a repr(Rust) union used for type punning in the Teddy matcher.
419* [BUG #591](https://github.com/rust-lang/regex/issues/591):
420  Update docs for running benchmarks and improve failure modes.
421
422
4231.1.7 (2019-06-09)
424==================
425This release fixes up a few warnings as a result of recent deprecations.
426
427
4281.1.6 (2019-04-16)
429==================
430This release fixes a regression introduced by a bug fix (for
431[BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause
432the regex engine to enter an infinite loop. This bug was originally
433[reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247).
434
435
4361.1.5 (2019-04-01)
437==================
438This release fixes a bug in regex's dependency specification where it requires
439a newer version of regex-syntax, but this wasn't communicated correctly in the
440Cargo.toml. This would have been caught by a minimal version check, but this
441check was disabled because the `rand` crate itself advertises incorrect
442dependency specifications.
443
444Bug fixes:
445
446* [BUG #570](https://github.com/rust-lang/regex/pull/570):
447  Fix regex-syntax minimal version.
448
449
4501.1.4 (2019-03-31)
451==================
452This release fixes a backwards compatibility regression where Regex was no
453longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose
454AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick
4550.7.4, which we now require.
456
457Bug fixes:
458
459* [BUG #568](https://github.com/rust-lang/regex/pull/568):
460  Fix an API regression where Regex was no longer UnwindSafe.
461
462
4631.1.3 (2019-03-30)
464==================
465This releases fixes a few bugs and adds a performance improvement when a regex
466is a simple alternation of literals.
467
468Performance improvements:
469
470* [OPT #566](https://github.com/rust-lang/regex/pull/566):
471  Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes.
472
473Bug fixes:
474
475* [BUG #527](https://github.com/rust-lang/regex/issues/527):
476  Fix a bug where the parser would panic on patterns like `((?x))`.
477* [BUG #555](https://github.com/rust-lang/regex/issues/555):
478  Fix a bug where the parser would panic on patterns like `(?m){1,1}`.
479* [BUG #557](https://github.com/rust-lang/regex/issues/557):
480  Fix a bug where captures could lead to an incorrect match.
481
482
4831.1.2 (2019-02-27)
484==================
485This release fixes a bug found in the fix introduced in 1.1.1.
486
487Bug fixes:
488
489* [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f):
490  Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release.
491
492
4931.1.1 (2019-02-27)
494==================
495This is a small release with one fix for a bug caused by literal optimizations.
496
497Bug fixes:
498
499* [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d):
500  Fixes a bug in the reverse suffix literal optimization. This was originally
501  reported
502  [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203).
503
504
5051.1.0 (2018-11-30)
506==================
507This is a small release with a couple small enhancements. This release also
508increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In
509accordance with this crate's MSRV policy, this release bumps the minor version
510number.
511
512Performance improvements:
513
514* [OPT #511](https://github.com/rust-lang/regex/pull/511),
515  [OPT #540](https://github.com/rust-lang/regex/pull/540):
516  Improve lazy DFA construction for large regex sets.
517
518New features:
519
520* [FEATURE #538](https://github.com/rust-lang/regex/pull/538):
521  Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md).
522
523Bug fixes:
524
525* [BUG #530](https://github.com/rust-lang/regex/pull/530):
526  Add Unicode license (for data tables).
527* Various typo/doc fixups.
528
529
5301.0.6 (2018-11-06)
531==================
532This is a small release.
533
534Performance improvements:
535
536* [OPT #513](https://github.com/rust-lang/regex/pull/513):
537  Improve performance of compiling large Unicode classes by 8-10%.
538
539Bug fixes:
540
541* [BUG #533](https://github.com/rust-lang/regex/issues/533):
542  Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`.
543
544
5451.0.5 (2018-09-06)
546==================
547This is a small release with an API enhancement.
548
549New features:
550
551* [FEATURE #509](https://github.com/rust-lang/regex/pull/509):
552  Generalize impls of the `Replacer` trait.
553
554
5551.0.4 (2018-08-25)
556==================
557This is a small release that bumps the quickcheck dependency.
558
559
5601.0.3 (2018-08-24)
561==================
562This is a small bug fix release.
563
564Bug fixes:
565
566* [BUG #504](https://github.com/rust-lang/regex/pull/504):
567  Fix for Cargo's "minimal version" support.
568* [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f):
569  Fix doc examples for byte regexes.
570
571
5721.0.2 (2018-07-18)
573==================
574This release exposes some new lower level APIs on `Regex` that permit
575amortizing allocation and controlling the location at which a search is
576performed in a more granular way. Most users of the regex crate will not
577need or want to use these APIs.
578
579New features:
580
581* [FEATURE #493](https://github.com/rust-lang/regex/pull/493):
582  Add a few lower level APIs for amortizing allocation and more fine grained
583  searching.
584
585Bug fixes:
586
587* [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad):
588  Correct outdated documentation on `RegexBuilder::dot_matches_new_line`.
589* [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0):
590  Correct outdated documentation on `Parser::allow_invalid_utf8` in the
591  `regex-syntax` crate.
592* [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b):
593  Fix a bug in the HIR printer where it wouldn't correctly escape meta
594  characters in character classes.
595
596
5971.0.1 (2018-06-19)
598==================
599This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD
600optimizations automatically on Rust stable (1.27 or newer).
601
602New features:
603
604* [FEATURE #486](https://github.com/rust-lang/regex/pull/486):
605  Implement `size_hint` on `RegexSet` match iterators.
606* [FEATURE #488](https://github.com/rust-lang/regex/pull/488):
607  Update Unicode tables for Unicode 11.
608* [FEATURE #490](https://github.com/rust-lang/regex/pull/490):
609  SIMD optimizations are now enabled automatically in Rust stable, for versions
610  1.27 and up. No compilation flags or features need to be set. CPU support
611  SIMD is detected automatically at runtime.
612
613Bug fixes:
614
615* [BUG #482](https://github.com/rust-lang/regex/pull/482):
616  Present a better compilation error when the `use_std` feature isn't used.
617
618
6191.0.0 (2018-05-01)
620==================
621This release marks the 1.0 release of regex.
622
623While this release includes some breaking changes, most users of older versions
624of the regex library should be able to migrate to 1.0 by simply bumping the
625version number. The important changes are as follows:
626
627* We adopt Rust 1.20 as the new minimum supported version of Rust for regex.
628  We also tentativley adopt a policy that permits bumping the minimum supported
629  version of Rust in minor version releases of regex, but no patch releases.
630  That is, with respect to semver, we do not strictly consider bumping the
631  minimum version of Rust to be a breaking change, but adopt a conservative
632  stance as a compromise.
633* Octal syntax in regular expressions has been disabled by default. This
634  permits better error messages that inform users that backreferences aren't
635  available. Octal syntax can be re-enabled via the corresponding option on
636  `RegexBuilder`.
637* `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at
638  invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode
639  regexes.
640* The `From<regex_syntax::Error>` impl has been removed. This formally removes
641  the public dependency on `regex-syntax`.
642* A new feature, `use_std`, has been added and enabled by default. Disabling
643  the feature will result in a compilation error. In the future, this may
644  permit us to support `no_std` environments (w/ `alloc`) in a backwards
645  compatible way.
646
647For more information and discussion, please see
648[1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457).
649
650
6510.2.11 (2018-05-01)
652===================
653This release primarily contains bug fixes. Some of them resolve bugs where
654the parser could panic.
655
656New features:
657
658* [FEATURE #459](https://github.com/rust-lang/regex/pull/459):
659  Include C++'s standard regex library and Boost's regex library in the
660  benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma,
661  PCRE1, PCRE2, RE2 and Tcl in the harness.
662
663Bug fixes:
664
665* [BUG #445](https://github.com/rust-lang/regex/issues/445):
666  Clarify order of indices returned by RegexSet match iterator.
667* [BUG #461](https://github.com/rust-lang/regex/issues/461):
668  Improve error messages for invalid regexes like `[\d-a]`.
669* [BUG #464](https://github.com/rust-lang/regex/issues/464):
670  Fix a bug in the error message pretty printer that could cause a panic when
671  a regex contained a literal `\n` character.
672* [BUG #465](https://github.com/rust-lang/regex/issues/465):
673  Fix a panic in the parser that was caused by applying a repetition operator
674  to `(?flags)`.
675* [BUG #466](https://github.com/rust-lang/regex/issues/466):
676  Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`.
677* [BUG #470](https://github.com/rust-lang/regex/pull/470):
678  Fix a bug where literal searches did more work than necessary for anchored
679  regexes.
680
681
6820.2.10 (2018-03-16)
683===================
684This release primarily updates the regex crate to changes made in `std::arch`
685on nightly Rust.
686
687New features:
688
689* [FEATURE #458](https://github.com/rust-lang/regex/pull/458):
690  The `Hir` type in `regex-syntax` now has a printer.
691
692
6930.2.9 (2018-03-12)
694==================
695This release introduces a new nightly only feature, `unstable`, which enables
696SIMD optimizations for certain types of regexes. No additional compile time
697options are necessary, and the regex crate will automatically choose the
698best CPU features at run time. As a result, the `simd` (nightly only) crate
699dependency has been dropped.
700
701New features:
702
703* [FEATURE #456](https://github.com/rust-lang/regex/pull/456):
704  The regex crate now includes AVX2 optimizations in addition to the extant
705  SSSE3 optimization.
706
707Bug fixes:
708
709* [BUG #455](https://github.com/rust-lang/regex/pull/455):
710  Fix a bug where `(?x)[ / - ]` failed to parse.
711
712
7130.2.8 (2018-03-12)
714==================
715Bug gixes:
716
717* [BUG #454](https://github.com/rust-lang/regex/pull/454):
718  Fix a bug in the nest limit checker being too aggressive.
719
720
7210.2.7 (2018-03-07)
722==================
723This release includes a ground-up rewrite of the regex-syntax crate, which has
724been in development for over a year.
725
726New features:
727
728* Error messages for invalid regexes have been greatly improved. You get these
729  automatically; you don't need to do anything. In addition to better
730  formatting, error messages will now explicitly call out the use of look
731  around. When regex 1.0 is released, this will happen for backreferences as
732  well.
733* Full support for intersection, difference and symmetric difference of
734  character classes. These can be used via the `&&`, `--` and `~~` binary
735  operators within classes.
736* A Unicode Level 1 conformat implementation of `\p{..}` character classes.
737  Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}`
738  now work. All property name and value aliases are supported, and properties
739  are selected via loose matching. e.g., `\p{Greek}` is the same as
740  `\p{G r E e K}`.
741* A new `UNICODE.md` document has been added to this repository that
742  exhaustively documents support for UTS#18.
743* Empty sub-expressions are now permitted in most places. That is, `()+` is
744  now a valid regex.
745* Almost everything in regex-syntax now uses constant stack space, even when
746  performing analysis that requires structural induction. This reduces the risk
747  of a user provided regular expression causing a stack overflow.
748* [FEATURE #174](https://github.com/rust-lang/regex/issues/174):
749  The `Ast` type in `regex-syntax` now contains span information.
750* [FEATURE #424](https://github.com/rust-lang/regex/issues/424):
751  Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points
752  in a regular expression.
753* [FEATURE #449](https://github.com/rust-lang/regex/pull/449):
754  Add a `Replace::by_ref` adapter for use of a replacer without consuming it.
755
756Bug fixes:
757
758* [BUG #446](https://github.com/rust-lang/regex/issues/446):
759  We re-enable the Boyer-Moore literal matcher.
760
761
7620.2.6 (2018-02-08)
763==================
764Bug fixes:
765
766* [BUG #446](https://github.com/rust-lang/regex/issues/446):
767  Fixes a bug in the new Boyer-Moore searcher that results in a match failure.
768  We fix this bug by temporarily disabling Boyer-Moore.
769
770
7710.2.5 (2017-12-30)
772==================
773Bug fixes:
774
775* [BUG #437](https://github.com/rust-lang/regex/issues/437):
776  Fixes a bug in the new Boyer-Moore searcher that results in a panic.
777
778
7790.2.4 (2017-12-30)
780==================
781New features:
782
783* [FEATURE #348](https://github.com/rust-lang/regex/pull/348):
784  Improve performance for capture searches on anchored regex.
785  (Contributed by @ethanpailes. Nice work!)
786* [FEATURE #419](https://github.com/rust-lang/regex/pull/419):
787  Expand literal searching to include Tuned Boyer-Moore in some cases.
788  (Contributed by @ethanpailes. Nice work!)
789
790Bug fixes:
791
792* [BUG](https://github.com/rust-lang/regex/pull/436):
793  The regex compiler plugin has been removed.
794* [BUG](https://github.com/rust-lang/regex/pull/436):
795  `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error.
796* [BUG](https://github.com/rust-lang/regex/pull/436):
797  Bring the benchmark harness up to date.
798
799
8000.2.3 (2017-11-30)
801==================
802New features:
803
804* [FEATURE #374](https://github.com/rust-lang/regex/pull/374):
805  Add `impl From<Match> for &str`.
806* [FEATURE #380](https://github.com/rust-lang/regex/pull/380):
807  Derive `Clone` and `PartialEq` on `Error`.
808* [FEATURE #400](https://github.com/rust-lang/regex/pull/400):
809  Update to Unicode 10.
810
811Bug fixes:
812
813* [BUG #375](https://github.com/rust-lang/regex/issues/375):
814  Fix a bug that prevented the bounded backtracker from terminating.
815* [BUG #393](https://github.com/rust-lang/regex/issues/393),
816  [BUG #394](https://github.com/rust-lang/regex/issues/394):
817  Fix bug with `replace` methods for empty matches.
818
819
8200.2.2 (2017-05-21)
821==================
822New features:
823
824* [FEATURE #341](https://github.com/rust-lang/regex/issues/341):
825  Support nested character classes and intersection operation.
826  For example, `[\p{Greek}&&\pL]` matches greek letters and
827  `[[0-9]&&[^4]]` matches every decimal digit except `4`.
828  (Much thanks to @robinst, who contributed this awesome feature.)
829
830Bug fixes:
831
832* [BUG #321](https://github.com/rust-lang/regex/issues/321):
833  Fix bug in literal extraction and UTF-8 decoding.
834* [BUG #326](https://github.com/rust-lang/regex/issues/326):
835  Add documentation tip about the `(?x)` flag.
836* [BUG #333](https://github.com/rust-lang/regex/issues/333):
837  Show additional replacement example using curly braces.
838* [BUG #334](https://github.com/rust-lang/regex/issues/334):
839  Fix bug when resolving captures after a match.
840* [BUG #338](https://github.com/rust-lang/regex/issues/338):
841  Add example that uses `Captures::get` to API documentation.
842* [BUG #353](https://github.com/rust-lang/regex/issues/353):
843  Fix RegexSet bug that caused match failure in some cases.
844* [BUG #354](https://github.com/rust-lang/regex/pull/354):
845  Fix panic in parser when `(?x)` is used.
846* [BUG #358](https://github.com/rust-lang/regex/issues/358):
847  Fix literal optimization bug with RegexSet.
848* [BUG #359](https://github.com/rust-lang/regex/issues/359):
849  Fix example code in README.
850* [BUG #365](https://github.com/rust-lang/regex/pull/365):
851  Fix bug in `rure_captures_len` in the C binding.
852* [BUG #367](https://github.com/rust-lang/regex/issues/367):
853  Fix byte class bug that caused a panic.
854
855
8560.2.1
857=====
858One major bug with `replace_all` has been fixed along with a couple of other
859touchups.
860
861* [BUG #312](https://github.com/rust-lang/regex/issues/312):
862  Fix documentation for `NoExpand` to reference correct lifetime parameter.
863* [BUG #314](https://github.com/rust-lang/regex/issues/314):
864  Fix a bug with `replace_all` when replacing a match with the empty string.
865* [BUG #316](https://github.com/rust-lang/regex/issues/316):
866  Note a missing breaking change from the `0.2.0` CHANGELOG entry.
867  (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
868* [BUG #324](https://github.com/rust-lang/regex/issues/324):
869  Compiling `regex` should only require one version of `memchr` crate.
870
871
8720.2.0
873=====
874This is a new major release of the regex crate, and is an implementation of the
875[regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
876We are releasing a `0.2` first, and if there are no major problems, we will
877release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
8781.12.
879
880There are a number of **breaking changes** in `0.2`. They are split into two
881types. The first type correspond to breaking changes in regular expression
882syntax. The second type correspond to breaking changes in the API.
883
884Breaking changes for regex syntax:
885
886* POSIX character classes now require double bracketing. Previously, the regex
887  `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
888  as the character class containing the characters `:upper:`. The fix to this
889  change is to use `[[:upper:]]` instead. Note that variants like
890  `[[:upper:][:blank:]]` continue to work.
891* The character `[` must always be escaped inside a character class.
892* The characters `&`, `-` and `~` must be escaped if any one of them are
893  repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
894  equivalent while `[&&]` is illegal. (The motivation for this and the prior
895  change is to provide a backwards compatible path for adding character class
896  set notation.)
897* A `bytes::Regex` now has Unicode mode enabled by default (like the main
898  `Regex` type). This means regexes compiled with `bytes::Regex::new` that
899  don't have the Unicode flag set should add `(?-u)` to recover the original
900  behavior.
901
902Breaking changes for the regex API:
903
904* `find` and `find_iter` now **return `Match` values instead of
905  `(usize, usize)`.** `Match` values have `start` and `end` methods, which
906  return the match offsets. `Match` values also have an `as_str` method,
907  which returns the text of the match itself.
908* The `Captures` type now only provides a single iterator over all capturing
909  matches, which should replace uses of `iter` and `iter_pos`. Uses of
910  `iter_named` should use the `capture_names` method on `Regex`.
911* The `at` method on the `Captures` type has been renamed to `get`, and it
912  now returns a `Match`. Similarly, the `name` method on `Captures` now returns
913  a `Match`.
914* The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
915  is returned when no replacements are made.
916* The `Replacer` trait has been completely overhauled. This should only
917  impact clients that implement this trait explicitly. Standard uses of
918  the `replace` methods should continue to work unchanged. If you implement
919  the `Replacer` trait, please consult the new documentation.
920* The `quote` free function has been renamed to `escape`.
921* The `Regex::with_size_limit` method has been removed. It is replaced by
922  `RegexBuilder::size_limit`.
923* The `RegexBuilder` type has switched from owned `self` method receivers to
924  `&mut self` method receivers. Most uses will continue to work unchanged, but
925  some code may require naming an intermediate variable to hold the builder.
926* The `compile` method on `RegexBuilder` has been renamed to `build`.
927* The free `is_match` function has been removed. It is replaced by compiling
928  a `Regex` and calling its `is_match` method.
929* The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
930  on these impls, the fix is to define a wrapper type around `Regex`, impl
931  `Deref` on it and provide the necessary impls.
932* The `is_empty` method on `Captures` has been removed. This always returns
933  `false`, so its use is superfluous.
934* The `Syntax` variant of the `Error` type now contains a string instead of
935  a `regex_syntax::Error`. If you were examining syntax errors more closely,
936  you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
937* The `InvalidSet` variant of the `Error` type has been removed since it is
938  no longer used.
939* Most of the iterator types have been renamed to match conventions. If you
940  were using these iterator types explicitly, please consult the documentation
941  for its new name. For example, `RegexSplits` has been renamed to `Split`.
942
943A number of bugs have been fixed:
944
945* [BUG #151](https://github.com/rust-lang/regex/issues/151):
946  The `Replacer` trait has been changed to permit the caller to control
947  allocation.
948* [BUG #165](https://github.com/rust-lang/regex/issues/165):
949  Remove the free `is_match` function.
950* [BUG #166](https://github.com/rust-lang/regex/issues/166):
951  Expose more knobs (available in `0.1`) and remove `with_size_limit`.
952* [BUG #168](https://github.com/rust-lang/regex/issues/168):
953  Iterators produced by `Captures` now have the correct lifetime parameters.
954* [BUG #175](https://github.com/rust-lang/regex/issues/175):
955  Fix a corner case in the parsing of POSIX character classes.
956* [BUG #178](https://github.com/rust-lang/regex/issues/178):
957  Drop the `PartialEq` and `Eq` impls on `Regex`.
958* [BUG #179](https://github.com/rust-lang/regex/issues/179):
959  Remove `is_empty` from `Captures` since it always returns false.
960* [BUG #276](https://github.com/rust-lang/regex/issues/276):
961  Position of named capture can now be retrieved from a `Captures`.
962* [BUG #296](https://github.com/rust-lang/regex/issues/296):
963  Remove winapi/kernel32-sys dependency on UNIX.
964* [BUG #307](https://github.com/rust-lang/regex/issues/307):
965  Fix error on emscripten.
966
967
9680.1.80
969======
970* [PR #292](https://github.com/rust-lang/regex/pull/292):
971  Fixes bug #291, which was introduced by PR #290.
972
9730.1.79
974======
975* Require regex-syntax 0.3.8.
976
9770.1.78
978======
979* [PR #290](https://github.com/rust-lang/regex/pull/290):
980  Fixes bug #289, which caused some regexes with a certain combination
981  of literals to match incorrectly.
982
9830.1.77
984======
985* [PR #281](https://github.com/rust-lang/regex/pull/281):
986  Fixes bug #280 by disabling all literal optimizations when a pattern
987  is partially anchored.
988
9890.1.76
990======
991* Tweak criteria for using the Teddy literal matcher.
992
9930.1.75
994======
995* [PR #275](https://github.com/rust-lang/regex/pull/275):
996  Improves match verification performance in the Teddy SIMD searcher.
997* [PR #278](https://github.com/rust-lang/regex/pull/278):
998  Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
999* Implemented DoubleEndedIterator on regex set match iterators.
1000
10010.1.74
1002======
1003* Release regex-syntax 0.3.5 with a minor bug fix.
1004* Fix bug #272.
1005* Fix bug #277.
1006* [PR #270](https://github.com/rust-lang/regex/pull/270):
1007  Fixes bugs #264, #268 and an unreported where the DFA cache size could be
1008  drastically under estimated in some cases (leading to high unexpected memory
1009  usage).
1010
10110.1.73
1012======
1013* Release `regex-syntax 0.3.4`.
1014* Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
1015
10160.1.72
1017======
1018* [PR #262](https://github.com/rust-lang/regex/pull/262):
1019  Fixes a number of small bugs caught by fuzz testing (AFL).
1020
10210.1.71
1022======
1023* [PR #236](https://github.com/rust-lang/regex/pull/236):
1024  Fix a bug in how suffix literals were extracted, which could lead
1025  to invalid match behavior in some cases.
1026
10270.1.70
1028======
1029* [PR #231](https://github.com/rust-lang/regex/pull/231):
1030  Add SIMD accelerated multiple pattern search.
1031* [PR #228](https://github.com/rust-lang/regex/pull/228):
1032  Reintroduce the reverse suffix literal optimization.
1033* [PR #226](https://github.com/rust-lang/regex/pull/226):
1034  Implements NFA state compression in the lazy DFA.
1035* [PR #223](https://github.com/rust-lang/regex/pull/223):
1036  A fully anchored RegexSet can now short-circuit.
1037
10380.1.69
1039======
1040* [PR #216](https://github.com/rust-lang/regex/pull/216):
1041  Tweak the threshold for running backtracking.
1042* [PR #217](https://github.com/rust-lang/regex/pull/217):
1043  Add upper limit (from the DFA) to capture search (for the NFA).
1044* [PR #218](https://github.com/rust-lang/regex/pull/218):
1045  Add rure, a C API.
1046
10470.1.68
1048======
1049* [PR #210](https://github.com/rust-lang/regex/pull/210):
1050  Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
1051  instead of `extend_from_slice`.
1052* [PR #211](https://github.com/rust-lang/regex/pull/211):
1053  Fixed a bug in the handling of word boundaries in the DFA.
1054* [PR #213](https://github.com/rust-lang/pull/213):
1055  Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
1056  running regexes using any of the following regex engines: PCRE1, PCRE2,
1057  Oniguruma, RE2, Tcl and of course Rust's own regexes.
1058
10590.1.67
1060======
1061* [PR #201](https://github.com/rust-lang/regex/pull/201):
1062  Fix undefined behavior in the `regex!` compiler plugin macro.
1063* [PR #205](https://github.com/rust-lang/regex/pull/205):
1064  More improvements to DFA performance. Competitive with RE2. See PR for
1065  benchmarks.
1066* [PR #209](https://github.com/rust-lang/regex/pull/209):
1067  Release 0.1.66 was semver incompatible since it required a newer version
1068  of Rust than previous releases. This PR fixes that. (And `0.1.66` was
1069  yanked.)
1070
10710.1.66
1072======
1073* Speculative support for Unicode word boundaries was added to the DFA. This
1074  should remove the last common case that disqualified use of the DFA.
1075* An optimization that scanned for suffix literals and then matched the regular
1076  expression in reverse was removed because it had worst case quadratic time
1077  complexity. It was replaced with a more limited optimization where, given any
1078  regex of the form `re$`, it will be matched in reverse from the end of the
1079  haystack.
1080* [PR #202](https://github.com/rust-lang/regex/pull/202):
1081  The inner loop of the DFA was heavily optimized to improve cache locality
1082  and reduce the overall number of instructions run on each iteration. This
1083  represents the first use of `unsafe` in `regex` (to elide bounds checks).
1084* [PR #200](https://github.com/rust-lang/regex/pull/200):
1085  Use of the `mempool` crate (which used thread local storage) was replaced
1086  with a faster version of a similar API in @Amanieu's `thread_local` crate.
1087  It should reduce contention when using a regex from multiple threads
1088  simultaneously.
1089* PCRE2 JIT benchmarks were added. A benchmark comparison can be found
1090  [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
1091  (Includes a comparison with PCRE1's JIT and Oniguruma.)
1092* A bug where word boundaries weren't being matched correctly in the DFA was
1093  fixed. This only affected use of `bytes::Regex`.
1094* [#160](https://github.com/rust-lang/regex/issues/160):
1095  `Captures` now has a `Debug` impl.
1096