11.3.9 (2020-05-28)
2==================
3This release fixes a MSRV (Minimum Support Rust Version) regression in the
41.3.8 release. Namely, while 1.3.8 compiles on Rust 1.28, it actually does not
5compile on other Rust versions, such as Rust 1.39.
6
7Bug fixes:
8
9* [BUG #685](https://github.com/rust-lang/regex/issue/685):
10  Remove use of `doc_comment` crate, which cannot be used before Rust 1.43.
11
12
131.3.8 (2020-05-28)
14==================
15This release contains a couple of important bug fixes driven
16by better support for empty-subexpressions in regexes. For
17example, regexes like `b|` are now allowed. Major thanks to
18[@sliquister](https://github.com/sliquister) for implementing support for this
19in [#677](https://github.com/rust-lang/regex/pull/677).
20
21Bug fixes:
22
23* [BUG #523](https://github.com/rust-lang/regex/pull/523):
24  Add note to documentation that spaces can be escaped in `x` mode.
25* [BUG #524](https://github.com/rust-lang/regex/issue/524):
26  Add support for empty sub-expressions, including empty alternations.
27* [BUG #659](https://github.com/rust-lang/regex/issue/659):
28  Fix match bug caused by an empty sub-expression miscompilation.
29
30
311.3.7 (2020-04-17)
32==================
33This release contains a small bug fix that fixes how `regex` forwards crate
34features to `regex-syntax`. In particular, this will reduce recompilations in
35some cases.
36
37Bug fixes:
38
39* [BUG #665](https://github.com/rust-lang/regex/pull/665):
40  Fix feature forwarding to `regex-syntax`.
41
42
431.3.6 (2020-03-24)
44==================
45This release contains a sizable (~30%) performance improvement when compiling
46some kinds of large regular expressions.
47
48Performance improvements:
49
50* [PERF #657](https://github.com/rust-lang/regex/pull/657):
51  Improvement performance of compiling large regular expressions.
52
53
541.3.5 (2020-03-12)
55==================
56This release updates this crate to Unicode 13.
57
58New features:
59
60* [FEATURE #653](https://github.com/rust-lang/regex/pull/653):
61  Update `regex-syntax` to Unicode 13.
62
63
641.3.4 (2020-01-30)
65==================
66This is a small bug fix release that fixes a bug related to the scoping of
67flags in a regex. Namely, before this fix, a regex like `((?i)a)b)` would
68match `aB` despite the fact that `b` should not be matched case insensitively.
69
70Bug fixes:
71
72* [BUG #640](https://github.com/rust-lang/regex/issues/640):
73  Fix bug related to the scoping of flags in a regex.
74
75
761.3.3 (2020-01-09)
77==================
78This is a small maintenance release that upgrades the dependency on
79`thread_local` from `0.3` to `1.0`. The minimum supported Rust version remains
80at Rust 1.28.
81
82
831.3.2 (2020-01-09)
84==================
85This is a small maintenance release with some house cleaning and bug fixes.
86
87New features:
88
89* [FEATURE #631](https://github.com/rust-lang/regex/issues/631):
90  Add a `Match::range` method an a `From<Match> for Range` impl.
91
92Bug fixes:
93
94* [BUG #521](https://github.com/rust-lang/regex/issues/521):
95  Corrects `/-/.splitn("a", 2)` to return `["a"]` instead of `["a", ""]`.
96* [BUG #594](https://github.com/rust-lang/regex/pull/594):
97  Improve error reporting when writing `\p\`.
98* [BUG #627](https://github.com/rust-lang/regex/issues/627):
99  Corrects `/-/.split("a-")` to return `["a", ""]` instead of `["a"]`.
100* [BUG #633](https://github.com/rust-lang/regex/pull/633):
101  Squash deprecation warnings for the `std::error::Error::description` method.
102
103
1041.3.1 (2019-09-04)
105==================
106This is a maintenance release with no changes in order to try to work-around
107a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400).
108
109
1101.3.0 (2019-09-03)
111==================
112This release adds a plethora of new crate features that permit users of regex
113to shrink its size considerably, in exchange for giving up either functionality
114(such as Unicode support) or runtime performance. When all such features are
115disabled, the dependency tree for `regex` shrinks to exactly 1 crate
116(`regex-syntax`). More information about the new crate features can be
117[found in the docs](https://docs.rs/regex/*/#crate-features).
118
119Note that while this is a new minor version release, the minimum supported
120Rust version for this crate remains at `1.28.0`.
121
122New features:
123
124* [FEATURE #474](https://github.com/rust-lang/regex/issues/474):
125  The `use_std` feature has been deprecated in favor of the `std` feature.
126  The `use_std` feature will be removed in regex 2. Until then, `use_std` will
127  remain as an alias for the `std` feature.
128* [FEATURE #583](https://github.com/rust-lang/regex/issues/583):
129  Add a substantial number of crate features shrinking `regex`.
130
131
1321.2.1 (2019-08-03)
133==================
134This release does a bit of house cleaning. Namely:
135
136* This repository is now using rustfmt.
137* License headers have been removed from all files, in following suit with the
138  Rust project.
139* Teddy has been removed from the `regex` crate, and is now part of the
140  `aho-corasick` crate.
141  [See `aho-corasick`'s new `packed` sub-module for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html).
142* The `utf8-ranges` crate has been deprecated, with its functionality moving
143  into the
144  [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html).
145* The `ucd-util` dependency has been dropped, in favor of implementing what
146  little we need inside of `regex-syntax` itself.
147
148In general, this is part of an ongoing (long term) effort to make optimizations
149in the regex engine easier to reason about. The current code is too convoluted
150and thus it is very easy to introduce new bugs. This simplification effort is
151the primary motivation behind re-working the `aho-corasick` crate to not only
152bundle algorithms like Teddy, but to also provide regex-like match semantics
153automatically.
154
155Moving forward, the plan is to join up with the `bstr` and `regex-automata`
156crates, with the former providing more sophisticated substring search
157algorithms (thereby deleting existing code in `regex`) and the latter providing
158ahead-of-time compiled DFAs for cases where they are inexpensive to compute.
159
160
1611.2.0 (2019-07-20)
162==================
163This release updates regex's minimum supported Rust version to 1.28, which was
164release almost 1 year ago. This release also updates regex's Unicode data
165tables to 12.1.0.
166
167
1681.1.9 (2019-07-06)
169==================
170This release contains a bug fix that caused regex's tests to fail, due to a
171dependency on an unreleased behavior in regex-syntax.
172
173* [BUG #593](https://github.com/rust-lang/regex/issues/593):
174  Move an integration-style test on error messages into regex-syntax.
175
176
1771.1.8 (2019-07-04)
178==================
179This release contains a few small internal refactorings. One of which fixes
180an instance of undefined behavior in a part of the SIMD code.
181
182Bug fixes:
183
184* [BUG #545](https://github.com/rust-lang/regex/issues/545):
185  Improves error messages when a repetition operator is used without a number.
186* [BUG #588](https://github.com/rust-lang/regex/issues/588):
187  Removes use of a repr(Rust) union used for type punning in the Teddy matcher.
188* [BUG #591](https://github.com/rust-lang/regex/issues/591):
189  Update docs for running benchmarks and improve failure modes.
190
191
1921.1.7 (2019-06-09)
193==================
194This release fixes up a few warnings as a result of recent deprecations.
195
196
1971.1.6 (2019-04-16)
198==================
199This release fixes a regression introduced by a bug fix (for
200[BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause
201the regex engine to enter an infinite loop. This bug was originally
202[reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247).
203
204
2051.1.5 (2019-04-01)
206==================
207This release fixes a bug in regex's dependency specification where it requires
208a newer version of regex-syntax, but this wasn't communicated correctly in the
209Cargo.toml. This would have been caught by a minimal version check, but this
210check was disabled because the `rand` crate itself advertises incorrect
211dependency specifications.
212
213Bug fixes:
214
215* [BUG #570](https://github.com/rust-lang/regex/pull/570):
216  Fix regex-syntax minimal version.
217
218
2191.1.4 (2019-03-31)
220==================
221This release fixes a backwards compatibility regression where Regex was no
222longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose
223AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick
2240.7.4, which we now require.
225
226Bug fixes:
227
228* [BUG #568](https://github.com/rust-lang/regex/pull/568):
229  Fix an API regression where Regex was no longer UnwindSafe.
230
231
2321.1.3 (2019-03-30)
233==================
234This releases fixes a few bugs and adds a performance improvement when a regex
235is a simple alternation of literals.
236
237Performance improvements:
238
239* [OPT #566](https://github.com/rust-lang/regex/pull/566):
240  Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes.
241
242Bug fixes:
243
244* [BUG #527](https://github.com/rust-lang/regex/issues/527):
245  Fix a bug where the parser would panic on patterns like `((?x))`.
246* [BUG #555](https://github.com/rust-lang/regex/issues/555):
247  Fix a bug where the parser would panic on patterns like `(?m){1,1}`.
248* [BUG #557](https://github.com/rust-lang/regex/issues/557):
249  Fix a bug where captures could lead to an incorrect match.
250
251
2521.1.2 (2019-02-27)
253==================
254This release fixes a bug found in the fix introduced in 1.1.1.
255
256Bug fixes:
257
258* [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f):
259  Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release.
260
261
2621.1.1 (2019-02-27)
263==================
264This is a small release with one fix for a bug caused by literal optimizations.
265
266Bug fixes:
267
268* [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d):
269  Fixes a bug in the reverse suffix literal optimization. This was originally
270  reported
271  [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203).
272
273
2741.1.0 (2018-11-30)
275==================
276This is a small release with a couple small enhancements. This release also
277increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In
278accordance with this crate's MSRV policy, this release bumps the minor version
279number.
280
281Performance improvements:
282
283* [OPT #511](https://github.com/rust-lang/regex/pull/511),
284  [OPT #540](https://github.com/rust-lang/regex/pull/540):
285  Improve lazy DFA construction for large regex sets.
286
287New features:
288
289* [FEATURE #538](https://github.com/rust-lang/regex/pull/538):
290  Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md).
291
292Bug fixes:
293
294* [BUG #530](https://github.com/rust-lang/regex/pull/530):
295  Add Unicode license (for data tables).
296* Various typo/doc fixups.
297
298
2991.0.6 (2018-11-06)
300==================
301This is a small release.
302
303Performance improvements:
304
305* [OPT #513](https://github.com/rust-lang/regex/pull/513):
306  Improve performance of compiling large Unicode classes by 8-10%.
307
308Bug fixes:
309
310* [BUG #533](https://github.com/rust-lang/regex/issues/533):
311  Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`.
312
313
3141.0.5 (2018-09-06)
315==================
316This is a small release with an API enhancement.
317
318New features:
319
320* [FEATURE #509](https://github.com/rust-lang/regex/pull/509):
321  Generalize impls of the `Replacer` trait.
322
323
3241.0.4 (2018-08-25)
325==================
326This is a small release that bumps the quickcheck dependency.
327
328
3291.0.3 (2018-08-24)
330==================
331This is a small bug fix release.
332
333Bug fixes:
334
335* [BUG #504](https://github.com/rust-lang/regex/pull/504):
336  Fix for Cargo's "minimal version" support.
337* [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f):
338  Fix doc examples for byte regexes.
339
340
3411.0.2 (2018-07-18)
342==================
343This release exposes some new lower level APIs on `Regex` that permit
344amortizing allocation and controlling the location at which a search is
345performed in a more granular way. Most users of the regex crate will not
346need or want to use these APIs.
347
348New features:
349
350* [FEATURE #493](https://github.com/rust-lang/regex/pull/493):
351  Add a few lower level APIs for amortizing allocation and more fine grained
352  searching.
353
354Bug fixes:
355
356* [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad):
357  Correct outdated documentation on `RegexBuilder::dot_matches_new_line`.
358* [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0):
359  Correct outdated documentation on `Parser::allow_invalid_utf8` in the
360  `regex-syntax` crate.
361* [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b):
362  Fix a bug in the HIR printer where it wouldn't correctly escape meta
363  characters in character classes.
364
365
3661.0.1 (2018-06-19)
367==================
368This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD
369optimizations automatically on Rust stable (1.27 or newer).
370
371New features:
372
373* [FEATURE #486](https://github.com/rust-lang/regex/pull/486):
374  Implement `size_hint` on `RegexSet` match iterators.
375* [FEATURE #488](https://github.com/rust-lang/regex/pull/488):
376  Update Unicode tables for Unicode 11.
377* [FEATURE #490](https://github.com/rust-lang/regex/pull/490):
378  SIMD optimizations are now enabled automatically in Rust stable, for versions
379  1.27 and up. No compilation flags or features need to be set. CPU support
380  SIMD is detected automatically at runtime.
381
382Bug fixes:
383
384* [BUG #482](https://github.com/rust-lang/regex/pull/482):
385  Present a better compilation error when the `use_std` feature isn't used.
386
387
3881.0.0 (2018-05-01)
389==================
390This release marks the 1.0 release of regex.
391
392While this release includes some breaking changes, most users of older versions
393of the regex library should be able to migrate to 1.0 by simply bumping the
394version number. The important changes are as follows:
395
396* We adopt Rust 1.20 as the new minimum supported version of Rust for regex.
397  We also tentativley adopt a policy that permits bumping the minimum supported
398  version of Rust in minor version releases of regex, but no patch releases.
399  That is, with respect to semver, we do not strictly consider bumping the
400  minimum version of Rust to be a breaking change, but adopt a conservative
401  stance as a compromise.
402* Octal syntax in regular expressions has been disabled by default. This
403  permits better error messages that inform users that backreferences aren't
404  available. Octal syntax can be re-enabled via the corresponding option on
405  `RegexBuilder`.
406* `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at
407  invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode
408  regexes.
409* The `From<regex_syntax::Error>` impl has been removed. This formally removes
410  the public dependency on `regex-syntax`.
411* A new feature, `use_std`, has been added and enabled by default. Disabling
412  the feature will result in a compilation error. In the future, this may
413  permit us to support `no_std` environments (w/ `alloc`) in a backwards
414  compatible way.
415
416For more information and discussion, please see
417[1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457).
418
419
4200.2.11 (2018-05-01)
421===================
422This release primarily contains bug fixes. Some of them resolve bugs where
423the parser could panic.
424
425New features:
426
427* [FEATURE #459](https://github.com/rust-lang/regex/pull/459):
428  Include C++'s standard regex library and Boost's regex library in the
429  benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma,
430  PCRE1, PCRE2, RE2 and Tcl in the harness.
431
432Bug fixes:
433
434* [BUG #445](https://github.com/rust-lang/regex/issues/445):
435  Clarify order of indices returned by RegexSet match iterator.
436* [BUG #461](https://github.com/rust-lang/regex/issues/461):
437  Improve error messages for invalid regexes like `[\d-a]`.
438* [BUG #464](https://github.com/rust-lang/regex/issues/464):
439  Fix a bug in the error message pretty printer that could cause a panic when
440  a regex contained a literal `\n` character.
441* [BUG #465](https://github.com/rust-lang/regex/issues/465):
442  Fix a panic in the parser that was caused by applying a repetition operator
443  to `(?flags)`.
444* [BUG #466](https://github.com/rust-lang/regex/issues/466):
445  Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`.
446* [BUG #470](https://github.com/rust-lang/regex/pull/470):
447  Fix a bug where literal searches did more work than necessary for anchored
448  regexes.
449
450
4510.2.10 (2018-03-16)
452===================
453This release primarily updates the regex crate to changes made in `std::arch`
454on nightly Rust.
455
456New features:
457
458* [FEATURE #458](https://github.com/rust-lang/regex/pull/458):
459  The `Hir` type in `regex-syntax` now has a printer.
460
461
4620.2.9 (2018-03-12)
463==================
464This release introduces a new nightly only feature, `unstable`, which enables
465SIMD optimizations for certain types of regexes. No additional compile time
466options are necessary, and the regex crate will automatically choose the
467best CPU features at run time. As a result, the `simd` (nightly only) crate
468dependency has been dropped.
469
470New features:
471
472* [FEATURE #456](https://github.com/rust-lang/regex/pull/456):
473  The regex crate now includes AVX2 optimizations in addition to the extant
474  SSSE3 optimization.
475
476Bug fixes:
477
478* [BUG #455](https://github.com/rust-lang/regex/pull/455):
479  Fix a bug where `(?x)[ / - ]` failed to parse.
480
481
4820.2.8 (2018-03-12)
483==================
484Bug gixes:
485
486* [BUG #454](https://github.com/rust-lang/regex/pull/454):
487  Fix a bug in the nest limit checker being too aggressive.
488
489
4900.2.7 (2018-03-07)
491==================
492This release includes a ground-up rewrite of the regex-syntax crate, which has
493been in development for over a year.
494
495New features:
496
497* Error messages for invalid regexes have been greatly improved. You get these
498  automatically; you don't need to do anything. In addition to better
499  formatting, error messages will now explicitly call out the use of look
500  around. When regex 1.0 is released, this will happen for backreferences as
501  well.
502* Full support for intersection, difference and symmetric difference of
503  character classes. These can be used via the `&&`, `--` and `~~` binary
504  operators within classes.
505* A Unicode Level 1 conformat implementation of `\p{..}` character classes.
506  Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}`
507  now work. All property name and value aliases are supported, and properties
508  are selected via loose matching. e.g., `\p{Greek}` is the same as
509  `\p{G r E e K}`.
510* A new `UNICODE.md` document has been added to this repository that
511  exhaustively documents support for UTS#18.
512* Empty sub-expressions are now permitted in most places. That is, `()+` is
513  now a valid regex.
514* Almost everything in regex-syntax now uses constant stack space, even when
515  performing anaylsis that requires structural induction. This reduces the risk
516  of a user provided regular expression causing a stack overflow.
517* [FEATURE #174](https://github.com/rust-lang/regex/issues/174):
518  The `Ast` type in `regex-syntax` now contains span information.
519* [FEATURE #424](https://github.com/rust-lang/regex/issues/424):
520  Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points
521  in a regular expression.
522* [FEATURE #449](https://github.com/rust-lang/regex/pull/449):
523  Add a `Replace::by_ref` adapter for use of a replacer without consuming it.
524
525Bug fixes:
526
527* [BUG #446](https://github.com/rust-lang/regex/issues/446):
528  We re-enable the Boyer-Moore literal matcher.
529
530
5310.2.6 (2018-02-08)
532==================
533Bug fixes:
534
535* [BUG #446](https://github.com/rust-lang/regex/issues/446):
536  Fixes a bug in the new Boyer-Moore searcher that results in a match failure.
537  We fix this bug by temporarily disabling Boyer-Moore.
538
539
5400.2.5 (2017-12-30)
541==================
542Bug fixes:
543
544* [BUG #437](https://github.com/rust-lang/regex/issues/437):
545  Fixes a bug in the new Boyer-Moore searcher that results in a panic.
546
547
5480.2.4 (2017-12-30)
549==================
550New features:
551
552* [FEATURE #348](https://github.com/rust-lang/regex/pull/348):
553  Improve performance for capture searches on anchored regex.
554  (Contributed by @ethanpailes. Nice work!)
555* [FEATURE #419](https://github.com/rust-lang/regex/pull/419):
556  Expand literal searching to include Tuned Boyer-Moore in some cases.
557  (Contributed by @ethanpailes. Nice work!)
558
559Bug fixes:
560
561* [BUG](https://github.com/rust-lang/regex/pull/436):
562  The regex compiler plugin has been removed.
563* [BUG](https://github.com/rust-lang/regex/pull/436):
564  `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error.
565* [BUG](https://github.com/rust-lang/regex/pull/436):
566  Bring the benchmark harness up to date.
567
568
5690.2.3 (2017-11-30)
570==================
571New features:
572
573* [FEATURE #374](https://github.com/rust-lang/regex/pull/374):
574  Add `impl From<Match> for &str`.
575* [FEATURE #380](https://github.com/rust-lang/regex/pull/380):
576  Derive `Clone` and `PartialEq` on `Error`.
577* [FEATURE #400](https://github.com/rust-lang/regex/pull/400):
578  Update to Unicode 10.
579
580Bug fixes:
581
582* [BUG #375](https://github.com/rust-lang/regex/issues/375):
583  Fix a bug that prevented the bounded backtracker from terminating.
584* [BUG #393](https://github.com/rust-lang/regex/issues/393),
585  [BUG #394](https://github.com/rust-lang/regex/issues/394):
586  Fix bug with `replace` methods for empty matches.
587
588
5890.2.2 (2017-05-21)
590==================
591New features:
592
593* [FEATURE #341](https://github.com/rust-lang/regex/issues/341):
594  Support nested character classes and intersection operation.
595  For example, `[\p{Greek}&&\pL]` matches greek letters and
596  `[[0-9]&&[^4]]` matches every decimal digit except `4`.
597  (Much thanks to @robinst, who contributed this awesome feature.)
598
599Bug fixes:
600
601* [BUG #321](https://github.com/rust-lang/regex/issues/321):
602  Fix bug in literal extraction and UTF-8 decoding.
603* [BUG #326](https://github.com/rust-lang/regex/issues/326):
604  Add documentation tip about the `(?x)` flag.
605* [BUG #333](https://github.com/rust-lang/regex/issues/333):
606  Show additional replacement example using curly braces.
607* [BUG #334](https://github.com/rust-lang/regex/issues/334):
608  Fix bug when resolving captures after a match.
609* [BUG #338](https://github.com/rust-lang/regex/issues/338):
610  Add example that uses `Captures::get` to API documentation.
611* [BUG #353](https://github.com/rust-lang/regex/issues/353):
612  Fix RegexSet bug that caused match failure in some cases.
613* [BUG #354](https://github.com/rust-lang/regex/pull/354):
614  Fix panic in parser when `(?x)` is used.
615* [BUG #358](https://github.com/rust-lang/regex/issues/358):
616  Fix literal optimization bug with RegexSet.
617* [BUG #359](https://github.com/rust-lang/regex/issues/359):
618  Fix example code in README.
619* [BUG #365](https://github.com/rust-lang/regex/pull/365):
620  Fix bug in `rure_captures_len` in the C binding.
621* [BUG #367](https://github.com/rust-lang/regex/issues/367):
622  Fix byte class bug that caused a panic.
623
624
6250.2.1
626=====
627One major bug with `replace_all` has been fixed along with a couple of other
628touchups.
629
630* [BUG #312](https://github.com/rust-lang/regex/issues/312):
631  Fix documentation for `NoExpand` to reference correct lifetime parameter.
632* [BUG #314](https://github.com/rust-lang/regex/issues/314):
633  Fix a bug with `replace_all` when replacing a match with the empty string.
634* [BUG #316](https://github.com/rust-lang/regex/issues/316):
635  Note a missing breaking change from the `0.2.0` CHANGELOG entry.
636  (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
637* [BUG #324](https://github.com/rust-lang/regex/issues/324):
638  Compiling `regex` should only require one version of `memchr` crate.
639
640
6410.2.0
642=====
643This is a new major release of the regex crate, and is an implementation of the
644[regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
645We are releasing a `0.2` first, and if there are no major problems, we will
646release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
6471.12.
648
649There are a number of **breaking changes** in `0.2`. They are split into two
650types. The first type correspond to breaking changes in regular expression
651syntax. The second type correspond to breaking changes in the API.
652
653Breaking changes for regex syntax:
654
655* POSIX character classes now require double bracketing. Previously, the regex
656  `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
657  as the character class containing the characters `:upper:`. The fix to this
658  change is to use `[[:upper:]]` instead. Note that variants like
659  `[[:upper:][:blank:]]` continue to work.
660* The character `[` must always be escaped inside a character class.
661* The characters `&`, `-` and `~` must be escaped if any one of them are
662  repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
663  equivalent while `[&&]` is illegal. (The motivation for this and the prior
664  change is to provide a backwards compatible path for adding character class
665  set notation.)
666* A `bytes::Regex` now has Unicode mode enabled by default (like the main
667  `Regex` type). This means regexes compiled with `bytes::Regex::new` that
668  don't have the Unicode flag set should add `(?-u)` to recover the original
669  behavior.
670
671Breaking changes for the regex API:
672
673* `find` and `find_iter` now **return `Match` values instead of
674  `(usize, usize)`.** `Match` values have `start` and `end` methods, which
675  return the match offsets. `Match` values also have an `as_str` method,
676  which returns the text of the match itself.
677* The `Captures` type now only provides a single iterator over all capturing
678  matches, which should replace uses of `iter` and `iter_pos`. Uses of
679  `iter_named` should use the `capture_names` method on `Regex`.
680* The `at` method on the `Captures` type has been renamed to `get`, and it
681  now returns a `Match`. Similarly, the `name` method on `Captures` now returns
682  a `Match`.
683* The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
684  is returned when no replacements are made.
685* The `Replacer` trait has been completely overhauled. This should only
686  impact clients that implement this trait explicitly. Standard uses of
687  the `replace` methods should continue to work unchanged. If you implement
688  the `Replacer` trait, please consult the new documentation.
689* The `quote` free function has been renamed to `escape`.
690* The `Regex::with_size_limit` method has been removed. It is replaced by
691  `RegexBuilder::size_limit`.
692* The `RegexBuilder` type has switched from owned `self` method receivers to
693  `&mut self` method receivers. Most uses will continue to work unchanged, but
694  some code may require naming an intermediate variable to hold the builder.
695* The `compile` method on `RegexBuilder` has been renamed to `build`.
696* The free `is_match` function has been removed. It is replaced by compiling
697  a `Regex` and calling its `is_match` method.
698* The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
699  on these impls, the fix is to define a wrapper type around `Regex`, impl
700  `Deref` on it and provide the necessary impls.
701* The `is_empty` method on `Captures` has been removed. This always returns
702  `false`, so its use is superfluous.
703* The `Syntax` variant of the `Error` type now contains a string instead of
704  a `regex_syntax::Error`. If you were examining syntax errors more closely,
705  you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
706* The `InvalidSet` variant of the `Error` type has been removed since it is
707  no longer used.
708* Most of the iterator types have been renamed to match conventions. If you
709  were using these iterator types explicitly, please consult the documentation
710  for its new name. For example, `RegexSplits` has been renamed to `Split`.
711
712A number of bugs have been fixed:
713
714* [BUG #151](https://github.com/rust-lang/regex/issues/151):
715  The `Replacer` trait has been changed to permit the caller to control
716  allocation.
717* [BUG #165](https://github.com/rust-lang/regex/issues/165):
718  Remove the free `is_match` function.
719* [BUG #166](https://github.com/rust-lang/regex/issues/166):
720  Expose more knobs (available in `0.1`) and remove `with_size_limit`.
721* [BUG #168](https://github.com/rust-lang/regex/issues/168):
722  Iterators produced by `Captures` now have the correct lifetime parameters.
723* [BUG #175](https://github.com/rust-lang/regex/issues/175):
724  Fix a corner case in the parsing of POSIX character classes.
725* [BUG #178](https://github.com/rust-lang/regex/issues/178):
726  Drop the `PartialEq` and `Eq` impls on `Regex`.
727* [BUG #179](https://github.com/rust-lang/regex/issues/179):
728  Remove `is_empty` from `Captures` since it always returns false.
729* [BUG #276](https://github.com/rust-lang/regex/issues/276):
730  Position of named capture can now be retrieved from a `Captures`.
731* [BUG #296](https://github.com/rust-lang/regex/issues/296):
732  Remove winapi/kernel32-sys dependency on UNIX.
733* [BUG #307](https://github.com/rust-lang/regex/issues/307):
734  Fix error on emscripten.
735
736
7370.1.80
738======
739* [PR #292](https://github.com/rust-lang/regex/pull/292):
740  Fixes bug #291, which was introduced by PR #290.
741
7420.1.79
743======
744* Require regex-syntax 0.3.8.
745
7460.1.78
747======
748* [PR #290](https://github.com/rust-lang/regex/pull/290):
749  Fixes bug #289, which caused some regexes with a certain combination
750  of literals to match incorrectly.
751
7520.1.77
753======
754* [PR #281](https://github.com/rust-lang/regex/pull/281):
755  Fixes bug #280 by disabling all literal optimizations when a pattern
756  is partially anchored.
757
7580.1.76
759======
760* Tweak criteria for using the Teddy literal matcher.
761
7620.1.75
763======
764* [PR #275](https://github.com/rust-lang/regex/pull/275):
765  Improves match verification performance in the Teddy SIMD searcher.
766* [PR #278](https://github.com/rust-lang/regex/pull/278):
767  Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
768* Implemented DoubleEndedIterator on regex set match iterators.
769
7700.1.74
771======
772* Release regex-syntax 0.3.5 with a minor bug fix.
773* Fix bug #272.
774* Fix bug #277.
775* [PR #270](https://github.com/rust-lang/regex/pull/270):
776  Fixes bugs #264, #268 and an unreported where the DFA cache size could be
777  drastically under estimated in some cases (leading to high unexpected memory
778  usage).
779
7800.1.73
781======
782* Release `regex-syntax 0.3.4`.
783* Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
784
7850.1.72
786======
787* [PR #262](https://github.com/rust-lang/regex/pull/262):
788  Fixes a number of small bugs caught by fuzz testing (AFL).
789
7900.1.71
791======
792* [PR #236](https://github.com/rust-lang/regex/pull/236):
793  Fix a bug in how suffix literals were extracted, which could lead
794  to invalid match behavior in some cases.
795
7960.1.70
797======
798* [PR #231](https://github.com/rust-lang/regex/pull/231):
799  Add SIMD accelerated multiple pattern search.
800* [PR #228](https://github.com/rust-lang/regex/pull/228):
801  Reintroduce the reverse suffix literal optimization.
802* [PR #226](https://github.com/rust-lang/regex/pull/226):
803  Implements NFA state compression in the lazy DFA.
804* [PR #223](https://github.com/rust-lang/regex/pull/223):
805  A fully anchored RegexSet can now short-circuit.
806
8070.1.69
808======
809* [PR #216](https://github.com/rust-lang/regex/pull/216):
810  Tweak the threshold for running backtracking.
811* [PR #217](https://github.com/rust-lang/regex/pull/217):
812  Add upper limit (from the DFA) to capture search (for the NFA).
813* [PR #218](https://github.com/rust-lang/regex/pull/218):
814  Add rure, a C API.
815
8160.1.68
817======
818* [PR #210](https://github.com/rust-lang/regex/pull/210):
819  Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
820  instead of `extend_from_slice`.
821* [PR #211](https://github.com/rust-lang/regex/pull/211):
822  Fixed a bug in the handling of word boundaries in the DFA.
823* [PR #213](https://github.com/rust-lang/pull/213):
824  Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
825  running regexes using any of the following regex engines: PCRE1, PCRE2,
826  Oniguruma, RE2, Tcl and of course Rust's own regexes.
827
8280.1.67
829======
830* [PR #201](https://github.com/rust-lang/regex/pull/201):
831  Fix undefined behavior in the `regex!` compiler plugin macro.
832* [PR #205](https://github.com/rust-lang/regex/pull/205):
833  More improvements to DFA performance. Competitive with RE2. See PR for
834  benchmarks.
835* [PR #209](https://github.com/rust-lang/regex/pull/209):
836  Release 0.1.66 was semver incompatible since it required a newer version
837  of Rust than previous releases. This PR fixes that. (And `0.1.66` was
838  yanked.)
839
8400.1.66
841======
842* Speculative support for Unicode word boundaries was added to the DFA. This
843  should remove the last common case that disqualified use of the DFA.
844* An optimization that scanned for suffix literals and then matched the regular
845  expression in reverse was removed because it had worst case quadratic time
846  complexity. It was replaced with a more limited optimization where, given any
847  regex of the form `re$`, it will be matched in reverse from the end of the
848  haystack.
849* [PR #202](https://github.com/rust-lang/regex/pull/202):
850  The inner loop of the DFA was heavily optimized to improve cache locality
851  and reduce the overall number of instructions run on each iteration. This
852  represents the first use of `unsafe` in `regex` (to elide bounds checks).
853* [PR #200](https://github.com/rust-lang/regex/pull/200):
854  Use of the `mempool` crate (which used thread local storage) was replaced
855  with a faster version of a similar API in @Amanieu's `thread_local` crate.
856  It should reduce contention when using a regex from multiple threads
857  simultaneously.
858* PCRE2 JIT benchmarks were added. A benchmark comparison can be found
859  [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
860  (Includes a comparison with PCRE1's JIT and Oniguruma.)
861* A bug where word boundaries weren't being matched correctly in the DFA was
862  fixed. This only affected use of `bytes::Regex`.
863* [#160](https://github.com/rust-lang/regex/issues/160):
864  `Captures` now has a `Debug` impl.
865