3 This is a maintenance release with no changes in order to try to work-around
4 a [docs.rs/Cargo issue](https://github.com/rust-lang/docs.rs/issues/400).
9 This release adds a plethora of new crate features that permit users of regex
10 to shrink its size considerably, in exchange for giving up either functionality
11 (such as Unicode support) or runtime performance. When all such features are
12 disabled, the dependency tree for `regex` shrinks to exactly 1 crate
13 (`regex-syntax`). More information about the new crate features can be
14 [found in the docs](https://docs.rs/regex/*/#crate-features).
16 Note that while this is a new minor version release, the minimum supported
17 Rust version for this crate remains at `1.28.0`.
21 * [FEATURE #474](https://github.com/rust-lang/regex/issues/474):
22 The `use_std` feature has been deprecated in favor of the `std` feature.
23 The `use_std` feature will be removed in regex 2. Until then, `use_std` will
24 remain as an alias for the `std` feature.
25 * [FEATURE #583](https://github.com/rust-lang/regex/issues/583):
26 Add a substantial number of crate features shrinking `regex`.
31 This release does a bit of house cleaning. Namely:
33 * This repository is now using rustfmt.
34 * License headers have been removed from all files, in following suit with the
36 * Teddy has been removed from the `regex` crate, and is now part of the
38 [See `aho-corasick`'s new `packed` sub-module for details](https://docs.rs/aho-corasick/0.7.6/aho_corasick/packed/index.html).
39 * The `utf8-ranges` crate has been deprecated, with its functionality moving
41 [`utf8` sub-module of `regex-syntax`](https://docs.rs/regex-syntax/0.6.11/regex_syntax/utf8/index.html).
42 * The `ucd-util` dependency has been dropped, in favor of implementing what
43 little we need inside of `regex-syntax` itself.
45 In general, this is part of an ongoing (long term) effort to make optimizations
46 in the regex engine easier to reason about. The current code is too convoluted
47 and thus it is very easy to introduce new bugs. This simplification effort is
48 the primary motivation behind re-working the `aho-corasick` crate to not only
49 bundle algorithms like Teddy, but to also provide regex-like match semantics
52 Moving forward, the plan is to join up with the `bstr` and `regex-automata`
53 crates, with the former providing more sophisticated substring search
54 algorithms (thereby deleting existing code in `regex`) and the latter providing
55 ahead-of-time compiled DFAs for cases where they are inexpensive to compute.
60 This release updates regex's minimum supported Rust version to 1.28, which was
61 release almost 1 year ago. This release also updates regex's Unicode data
67 This release contains a bug fix that caused regex's tests to fail, due to a
68 dependency on an unreleased behavior in regex-syntax.
70 * [BUG #593](https://github.com/rust-lang/regex/issues/593):
71 Move an integration-style test on error messages into regex-syntax.
76 This release contains a few small internal refactorings. One of which fixes
77 an instance of undefined behavior in a part of the SIMD code.
81 * [BUG #545](https://github.com/rust-lang/regex/issues/545):
82 Improves error messages when a repetition operator is used without a number.
83 * [BUG #588](https://github.com/rust-lang/regex/issues/588):
84 Removes use of a repr(Rust) union used for type punning in the Teddy matcher.
85 * [BUG #591](https://github.com/rust-lang/regex/issues/591):
86 Update docs for running benchmarks and improve failure modes.
91 This release fixes up a few warnings as a result of recent deprecations.
96 This release fixes a regression introduced by a bug fix (for
97 [BUG #557](https://github.com/rust-lang/regex/issues/557)) which could cause
98 the regex engine to enter an infinite loop. This bug was originally
99 [reported against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1247).
104 This release fixes a bug in regex's dependency specification where it requires
105 a newer version of regex-syntax, but this wasn't communicated correctly in the
106 Cargo.toml. This would have been caught by a minimal version check, but this
107 check was disabled because the `rand` crate itself advertises incorrect
108 dependency specifications.
112 * [BUG #570](https://github.com/rust-lang/regex/pull/570):
113 Fix regex-syntax minimal version.
118 This release fixes a backwards compatibility regression where Regex was no
119 longer UnwindSafe. This was caused by the upgrade to aho-corasick 0.7, whose
120 AhoCorasick type was itself not UnwindSafe. This has been fixed in aho-corasick
121 0.7.4, which we now require.
125 * [BUG #568](https://github.com/rust-lang/regex/pull/568):
126 Fix an API regression where Regex was no longer UnwindSafe.
131 This releases fixes a few bugs and adds a performance improvement when a regex
132 is a simple alternation of literals.
134 Performance improvements:
136 * [OPT #566](https://github.com/rust-lang/regex/pull/566):
137 Upgrades `aho-corasick` to 0.7 and uses it for `foo|bar|...|quux` regexes.
141 * [BUG #527](https://github.com/rust-lang/regex/issues/527):
142 Fix a bug where the parser would panic on patterns like `((?x))`.
143 * [BUG #555](https://github.com/rust-lang/regex/issues/555):
144 Fix a bug where the parser would panic on patterns like `(?m){1,1}`.
145 * [BUG #557](https://github.com/rust-lang/regex/issues/557):
146 Fix a bug where captures could lead to an incorrect match.
151 This release fixes a bug found in the fix introduced in 1.1.1.
155 * [BUG edf45e6f](https://github.com/rust-lang/regex/commit/edf45e6f):
156 Fix bug introduced in reverse suffix literal matcher in the 1.1.1 release.
161 This is a small release with one fix for a bug caused by literal optimizations.
165 * [BUG 661bf53d](https://github.com/rust-lang/regex/commit/661bf53d):
166 Fixes a bug in the reverse suffix literal optimization. This was originally
168 [against ripgrep](https://github.com/BurntSushi/ripgrep/issues/1203).
173 This is a small release with a couple small enhancements. This release also
174 increases the minimal supported Rust version (MSRV) to 1.24.1 (from 1.20.0). In
175 accordance with this crate's MSRV policy, this release bumps the minor version
178 Performance improvements:
180 * [OPT #511](https://github.com/rust-lang/regex/pull/511),
181 [OPT #540](https://github.com/rust-lang/regex/pull/540):
182 Improve lazy DFA construction for large regex sets.
186 * [FEATURE #538](https://github.com/rust-lang/regex/pull/538):
187 Add Emoji and "break" Unicode properties. See [UNICODE.md](UNICODE.md).
191 * [BUG #530](https://github.com/rust-lang/regex/pull/530):
192 Add Unicode license (for data tables).
193 * Various typo/doc fixups.
198 This is a small release.
200 Performance improvements:
202 * [OPT #513](https://github.com/rust-lang/regex/pull/513):
203 Improve performance of compiling large Unicode classes by 8-10%.
207 * [BUG #533](https://github.com/rust-lang/regex/issues/533):
208 Fix definition of `[[:blank:]]` class that regressed in `regex-syntax 0.5`.
213 This is a small release with an API enhancement.
217 * [FEATURE #509](https://github.com/rust-lang/regex/pull/509):
218 Generalize impls of the `Replacer` trait.
223 This is a small release that bumps the quickcheck dependency.
228 This is a small bug fix release.
232 * [BUG #504](https://github.com/rust-lang/regex/pull/504):
233 Fix for Cargo's "minimal version" support.
234 * [BUG 1e39165f](https://github.com/rust-lang/regex/commit/1e39165f):
235 Fix doc examples for byte regexes.
240 This release exposes some new lower level APIs on `Regex` that permit
241 amortizing allocation and controlling the location at which a search is
242 performed in a more granular way. Most users of the regex crate will not
243 need or want to use these APIs.
247 * [FEATURE #493](https://github.com/rust-lang/regex/pull/493):
248 Add a few lower level APIs for amortizing allocation and more fine grained
253 * [BUG 3981d2ad](https://github.com/rust-lang/regex/commit/3981d2ad):
254 Correct outdated documentation on `RegexBuilder::dot_matches_new_line`.
255 * [BUG 7ebe4ae0](https://github.com/rust-lang/regex/commit/7ebe4ae0):
256 Correct outdated documentation on `Parser::allow_invalid_utf8` in the
257 `regex-syntax` crate.
258 * [BUG 24c7770b](https://github.com/rust-lang/regex/commit/24c7770b):
259 Fix a bug in the HIR printer where it wouldn't correctly escape meta
260 characters in character classes.
265 This release upgrades regex's Unicode tables to Unicode 11, and enables SIMD
266 optimizations automatically on Rust stable (1.27 or newer).
270 * [FEATURE #486](https://github.com/rust-lang/regex/pull/486):
271 Implement `size_hint` on `RegexSet` match iterators.
272 * [FEATURE #488](https://github.com/rust-lang/regex/pull/488):
273 Update Unicode tables for Unicode 11.
274 * [FEATURE #490](https://github.com/rust-lang/regex/pull/490):
275 SIMD optimizations are now enabled automatically in Rust stable, for versions
276 1.27 and up. No compilation flags or features need to be set. CPU support
277 SIMD is detected automatically at runtime.
281 * [BUG #482](https://github.com/rust-lang/regex/pull/482):
282 Present a better compilation error when the `use_std` feature isn't used.
287 This release marks the 1.0 release of regex.
289 While this release includes some breaking changes, most users of older versions
290 of the regex library should be able to migrate to 1.0 by simply bumping the
291 version number. The important changes are as follows:
293 * We adopt Rust 1.20 as the new minimum supported version of Rust for regex.
294 We also tentativley adopt a policy that permits bumping the minimum supported
295 version of Rust in minor version releases of regex, but no patch releases.
296 That is, with respect to semver, we do not strictly consider bumping the
297 minimum version of Rust to be a breaking change, but adopt a conservative
298 stance as a compromise.
299 * Octal syntax in regular expressions has been disabled by default. This
300 permits better error messages that inform users that backreferences aren't
301 available. Octal syntax can be re-enabled via the corresponding option on
303 * `(?-u:\B)` is no longer allowed in Unicode regexes since it can match at
304 invalid UTF-8 code unit boundaries. `(?-u:\b)` is still allowed in Unicode
306 * The `From<regex_syntax::Error>` impl has been removed. This formally removes
307 the public dependency on `regex-syntax`.
308 * A new feature, `use_std`, has been added and enabled by default. Disabling
309 the feature will result in a compilation error. In the future, this may
310 permit us to support `no_std` environments (w/ `alloc`) in a backwards
313 For more information and discussion, please see
314 [1.0 release tracking issue](https://github.com/rust-lang/regex/issues/457).
319 This release primarily contains bug fixes. Some of them resolve bugs where
320 the parser could panic.
324 * [FEATURE #459](https://github.com/rust-lang/regex/pull/459):
325 Include C++'s standard regex library and Boost's regex library in the
326 benchmark harness. We now include D/libphobos, C++/std, C++/boost, Oniguruma,
327 PCRE1, PCRE2, RE2 and Tcl in the harness.
331 * [BUG #445](https://github.com/rust-lang/regex/issues/445):
332 Clarify order of indices returned by RegexSet match iterator.
333 * [BUG #461](https://github.com/rust-lang/regex/issues/461):
334 Improve error messages for invalid regexes like `[\d-a]`.
335 * [BUG #464](https://github.com/rust-lang/regex/issues/464):
336 Fix a bug in the error message pretty printer that could cause a panic when
337 a regex contained a literal `\n` character.
338 * [BUG #465](https://github.com/rust-lang/regex/issues/465):
339 Fix a panic in the parser that was caused by applying a repetition operator
341 * [BUG #466](https://github.com/rust-lang/regex/issues/466):
342 Fix a bug where `\pC` was not recognized as an alias for `\p{Other}`.
343 * [BUG #470](https://github.com/rust-lang/regex/pull/470):
344 Fix a bug where literal searches did more work than necessary for anchored
350 This release primarily updates the regex crate to changes made in `std::arch`
355 * [FEATURE #458](https://github.com/rust-lang/regex/pull/458):
356 The `Hir` type in `regex-syntax` now has a printer.
361 This release introduces a new nightly only feature, `unstable`, which enables
362 SIMD optimizations for certain types of regexes. No additional compile time
363 options are necessary, and the regex crate will automatically choose the
364 best CPU features at run time. As a result, the `simd` (nightly only) crate
365 dependency has been dropped.
369 * [FEATURE #456](https://github.com/rust-lang/regex/pull/456):
370 The regex crate now includes AVX2 optimizations in addition to the extant
375 * [BUG #455](https://github.com/rust-lang/regex/pull/455):
376 Fix a bug where `(?x)[ / - ]` failed to parse.
383 * [BUG #454](https://github.com/rust-lang/regex/pull/454):
384 Fix a bug in the nest limit checker being too aggressive.
389 This release includes a ground-up rewrite of the regex-syntax crate, which has
390 been in development for over a year.
394 * Error messages for invalid regexes have been greatly improved. You get these
395 automatically; you don't need to do anything. In addition to better
396 formatting, error messages will now explicitly call out the use of look
397 around. When regex 1.0 is released, this will happen for backreferences as
399 * Full support for intersection, difference and symmetric difference of
400 character classes. These can be used via the `&&`, `--` and `~~` binary
401 operators within classes.
402 * A Unicode Level 1 conformat implementation of `\p{..}` character classes.
403 Things like `\p{scx:Hira}`, `\p{age:3.2}` or `\p{Changes_When_Casefolded}`
404 now work. All property name and value aliases are supported, and properties
405 are selected via loose matching. e.g., `\p{Greek}` is the same as
407 * A new `UNICODE.md` document has been added to this repository that
408 exhaustively documents support for UTS#18.
409 * Empty sub-expressions are now permitted in most places. That is, `()+` is
411 * Almost everything in regex-syntax now uses constant stack space, even when
412 performing anaylsis that requires structural induction. This reduces the risk
413 of a user provided regular expression causing a stack overflow.
414 * [FEATURE #174](https://github.com/rust-lang/regex/issues/174):
415 The `Ast` type in `regex-syntax` now contains span information.
416 * [FEATURE #424](https://github.com/rust-lang/regex/issues/424):
417 Support `\u`, `\u{...}`, `\U` and `\U{...}` syntax for specifying code points
418 in a regular expression.
419 * [FEATURE #449](https://github.com/rust-lang/regex/pull/449):
420 Add a `Replace::by_ref` adapter for use of a replacer without consuming it.
424 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
425 We re-enable the Boyer-Moore literal matcher.
432 * [BUG #446](https://github.com/rust-lang/regex/issues/446):
433 Fixes a bug in the new Boyer-Moore searcher that results in a match failure.
434 We fix this bug by temporarily disabling Boyer-Moore.
441 * [BUG #437](https://github.com/rust-lang/regex/issues/437):
442 Fixes a bug in the new Boyer-Moore searcher that results in a panic.
449 * [FEATURE #348](https://github.com/rust-lang/regex/pull/348):
450 Improve performance for capture searches on anchored regex.
451 (Contributed by @ethanpailes. Nice work!)
452 * [FEATURE #419](https://github.com/rust-lang/regex/pull/419):
453 Expand literal searching to include Tuned Boyer-Moore in some cases.
454 (Contributed by @ethanpailes. Nice work!)
458 * [BUG](https://github.com/rust-lang/regex/pull/436):
459 The regex compiler plugin has been removed.
460 * [BUG](https://github.com/rust-lang/regex/pull/436):
461 `simd` has been bumped to `0.2.1`, which fixes a Rust nightly build error.
462 * [BUG](https://github.com/rust-lang/regex/pull/436):
463 Bring the benchmark harness up to date.
470 * [FEATURE #374](https://github.com/rust-lang/regex/pull/374):
471 Add `impl From<Match> for &str`.
472 * [FEATURE #380](https://github.com/rust-lang/regex/pull/380):
473 Derive `Clone` and `PartialEq` on `Error`.
474 * [FEATURE #400](https://github.com/rust-lang/regex/pull/400):
475 Update to Unicode 10.
479 * [BUG #375](https://github.com/rust-lang/regex/issues/375):
480 Fix a bug that prevented the bounded backtracker from terminating.
481 * [BUG #393](https://github.com/rust-lang/regex/issues/393),
482 [BUG #394](https://github.com/rust-lang/regex/issues/394):
483 Fix bug with `replace` methods for empty matches.
490 * [FEATURE #341](https://github.com/rust-lang/regex/issues/341):
491 Support nested character classes and intersection operation.
492 For example, `[\p{Greek}&&\pL]` matches greek letters and
493 `[[0-9]&&[^4]]` matches every decimal digit except `4`.
494 (Much thanks to @robinst, who contributed this awesome feature.)
498 * [BUG #321](https://github.com/rust-lang/regex/issues/321):
499 Fix bug in literal extraction and UTF-8 decoding.
500 * [BUG #326](https://github.com/rust-lang/regex/issues/326):
501 Add documentation tip about the `(?x)` flag.
502 * [BUG #333](https://github.com/rust-lang/regex/issues/333):
503 Show additional replacement example using curly braces.
504 * [BUG #334](https://github.com/rust-lang/regex/issues/334):
505 Fix bug when resolving captures after a match.
506 * [BUG #338](https://github.com/rust-lang/regex/issues/338):
507 Add example that uses `Captures::get` to API documentation.
508 * [BUG #353](https://github.com/rust-lang/regex/issues/353):
509 Fix RegexSet bug that caused match failure in some cases.
510 * [BUG #354](https://github.com/rust-lang/regex/pull/354):
511 Fix panic in parser when `(?x)` is used.
512 * [BUG #358](https://github.com/rust-lang/regex/issues/358):
513 Fix literal optimization bug with RegexSet.
514 * [BUG #359](https://github.com/rust-lang/regex/issues/359):
515 Fix example code in README.
516 * [BUG #365](https://github.com/rust-lang/regex/pull/365):
517 Fix bug in `rure_captures_len` in the C binding.
518 * [BUG #367](https://github.com/rust-lang/regex/issues/367):
519 Fix byte class bug that caused a panic.
524 One major bug with `replace_all` has been fixed along with a couple of other
527 * [BUG #312](https://github.com/rust-lang/regex/issues/312):
528 Fix documentation for `NoExpand` to reference correct lifetime parameter.
529 * [BUG #314](https://github.com/rust-lang/regex/issues/314):
530 Fix a bug with `replace_all` when replacing a match with the empty string.
531 * [BUG #316](https://github.com/rust-lang/regex/issues/316):
532 Note a missing breaking change from the `0.2.0` CHANGELOG entry.
533 (`RegexBuilder::compile` was renamed to `RegexBuilder::build`.)
534 * [BUG #324](https://github.com/rust-lang/regex/issues/324):
535 Compiling `regex` should only require one version of `memchr` crate.
540 This is a new major release of the regex crate, and is an implementation of the
541 [regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
542 We are releasing a `0.2` first, and if there are no major problems, we will
543 release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
546 There are a number of **breaking changes** in `0.2`. They are split into two
547 types. The first type correspond to breaking changes in regular expression
548 syntax. The second type correspond to breaking changes in the API.
550 Breaking changes for regex syntax:
552 * POSIX character classes now require double bracketing. Previously, the regex
553 `[:upper:]` would parse as the `upper` POSIX character class. Now it parses
554 as the character class containing the characters `:upper:`. The fix to this
555 change is to use `[[:upper:]]` instead. Note that variants like
556 `[[:upper:][:blank:]]` continue to work.
557 * The character `[` must always be escaped inside a character class.
558 * The characters `&`, `-` and `~` must be escaped if any one of them are
559 repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
560 equivalent while `[&&]` is illegal. (The motivation for this and the prior
561 change is to provide a backwards compatible path for adding character class
563 * A `bytes::Regex` now has Unicode mode enabled by default (like the main
564 `Regex` type). This means regexes compiled with `bytes::Regex::new` that
565 don't have the Unicode flag set should add `(?-u)` to recover the original
568 Breaking changes for the regex API:
570 * `find` and `find_iter` now **return `Match` values instead of
571 `(usize, usize)`.** `Match` values have `start` and `end` methods, which
572 return the match offsets. `Match` values also have an `as_str` method,
573 which returns the text of the match itself.
574 * The `Captures` type now only provides a single iterator over all capturing
575 matches, which should replace uses of `iter` and `iter_pos`. Uses of
576 `iter_named` should use the `capture_names` method on `Regex`.
577 * The `at` method on the `Captures` type has been renamed to `get`, and it
578 now returns a `Match`. Similarly, the `name` method on `Captures` now returns
580 * The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
581 is returned when no replacements are made.
582 * The `Replacer` trait has been completely overhauled. This should only
583 impact clients that implement this trait explicitly. Standard uses of
584 the `replace` methods should continue to work unchanged. If you implement
585 the `Replacer` trait, please consult the new documentation.
586 * The `quote` free function has been renamed to `escape`.
587 * The `Regex::with_size_limit` method has been removed. It is replaced by
588 `RegexBuilder::size_limit`.
589 * The `RegexBuilder` type has switched from owned `self` method receivers to
590 `&mut self` method receivers. Most uses will continue to work unchanged, but
591 some code may require naming an intermediate variable to hold the builder.
592 * The `compile` method on `RegexBuilder` has been renamed to `build`.
593 * The free `is_match` function has been removed. It is replaced by compiling
594 a `Regex` and calling its `is_match` method.
595 * The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
596 on these impls, the fix is to define a wrapper type around `Regex`, impl
597 `Deref` on it and provide the necessary impls.
598 * The `is_empty` method on `Captures` has been removed. This always returns
599 `false`, so its use is superfluous.
600 * The `Syntax` variant of the `Error` type now contains a string instead of
601 a `regex_syntax::Error`. If you were examining syntax errors more closely,
602 you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
603 * The `InvalidSet` variant of the `Error` type has been removed since it is
605 * Most of the iterator types have been renamed to match conventions. If you
606 were using these iterator types explicitly, please consult the documentation
607 for its new name. For example, `RegexSplits` has been renamed to `Split`.
609 A number of bugs have been fixed:
611 * [BUG #151](https://github.com/rust-lang/regex/issues/151):
612 The `Replacer` trait has been changed to permit the caller to control
614 * [BUG #165](https://github.com/rust-lang/regex/issues/165):
615 Remove the free `is_match` function.
616 * [BUG #166](https://github.com/rust-lang/regex/issues/166):
617 Expose more knobs (available in `0.1`) and remove `with_size_limit`.
618 * [BUG #168](https://github.com/rust-lang/regex/issues/168):
619 Iterators produced by `Captures` now have the correct lifetime parameters.
620 * [BUG #175](https://github.com/rust-lang/regex/issues/175):
621 Fix a corner case in the parsing of POSIX character classes.
622 * [BUG #178](https://github.com/rust-lang/regex/issues/178):
623 Drop the `PartialEq` and `Eq` impls on `Regex`.
624 * [BUG #179](https://github.com/rust-lang/regex/issues/179):
625 Remove `is_empty` from `Captures` since it always returns false.
626 * [BUG #276](https://github.com/rust-lang/regex/issues/276):
627 Position of named capture can now be retrieved from a `Captures`.
628 * [BUG #296](https://github.com/rust-lang/regex/issues/296):
629 Remove winapi/kernel32-sys dependency on UNIX.
630 * [BUG #307](https://github.com/rust-lang/regex/issues/307):
631 Fix error on emscripten.
636 * [PR #292](https://github.com/rust-lang/regex/pull/292):
637 Fixes bug #291, which was introduced by PR #290.
641 * Require regex-syntax 0.3.8.
645 * [PR #290](https://github.com/rust-lang/regex/pull/290):
646 Fixes bug #289, which caused some regexes with a certain combination
647 of literals to match incorrectly.
651 * [PR #281](https://github.com/rust-lang/regex/pull/281):
652 Fixes bug #280 by disabling all literal optimizations when a pattern
653 is partially anchored.
657 * Tweak criteria for using the Teddy literal matcher.
661 * [PR #275](https://github.com/rust-lang/regex/pull/275):
662 Improves match verification performance in the Teddy SIMD searcher.
663 * [PR #278](https://github.com/rust-lang/regex/pull/278):
664 Replaces slow substring loop in the Teddy SIMD searcher with Aho-Corasick.
665 * Implemented DoubleEndedIterator on regex set match iterators.
669 * Release regex-syntax 0.3.5 with a minor bug fix.
672 * [PR #270](https://github.com/rust-lang/regex/pull/270):
673 Fixes bugs #264, #268 and an unreported where the DFA cache size could be
674 drastically under estimated in some cases (leading to high unexpected memory
679 * Release `regex-syntax 0.3.4`.
680 * Bump `regex-syntax` dependency version for `regex` to `0.3.4`.
684 * [PR #262](https://github.com/rust-lang/regex/pull/262):
685 Fixes a number of small bugs caught by fuzz testing (AFL).
689 * [PR #236](https://github.com/rust-lang/regex/pull/236):
690 Fix a bug in how suffix literals were extracted, which could lead
691 to invalid match behavior in some cases.
695 * [PR #231](https://github.com/rust-lang/regex/pull/231):
696 Add SIMD accelerated multiple pattern search.
697 * [PR #228](https://github.com/rust-lang/regex/pull/228):
698 Reintroduce the reverse suffix literal optimization.
699 * [PR #226](https://github.com/rust-lang/regex/pull/226):
700 Implements NFA state compression in the lazy DFA.
701 * [PR #223](https://github.com/rust-lang/regex/pull/223):
702 A fully anchored RegexSet can now short-circuit.
706 * [PR #216](https://github.com/rust-lang/regex/pull/216):
707 Tweak the threshold for running backtracking.
708 * [PR #217](https://github.com/rust-lang/regex/pull/217):
709 Add upper limit (from the DFA) to capture search (for the NFA).
710 * [PR #218](https://github.com/rust-lang/regex/pull/218):
715 * [PR #210](https://github.com/rust-lang/regex/pull/210):
716 Fixed a performance bug in `bytes::Regex::replace` where `extend` was used
717 instead of `extend_from_slice`.
718 * [PR #211](https://github.com/rust-lang/regex/pull/211):
719 Fixed a bug in the handling of word boundaries in the DFA.
720 * [PR #213](https://github.com/rust-lang/pull/213):
721 Added RE2 and Tcl to the benchmark harness. Also added a CLI utility from
722 running regexes using any of the following regex engines: PCRE1, PCRE2,
723 Oniguruma, RE2, Tcl and of course Rust's own regexes.
727 * [PR #201](https://github.com/rust-lang/regex/pull/201):
728 Fix undefined behavior in the `regex!` compiler plugin macro.
729 * [PR #205](https://github.com/rust-lang/regex/pull/205):
730 More improvements to DFA performance. Competitive with RE2. See PR for
732 * [PR #209](https://github.com/rust-lang/regex/pull/209):
733 Release 0.1.66 was semver incompatible since it required a newer version
734 of Rust than previous releases. This PR fixes that. (And `0.1.66` was
739 * Speculative support for Unicode word boundaries was added to the DFA. This
740 should remove the last common case that disqualified use of the DFA.
741 * An optimization that scanned for suffix literals and then matched the regular
742 expression in reverse was removed because it had worst case quadratic time
743 complexity. It was replaced with a more limited optimization where, given any
744 regex of the form `re$`, it will be matched in reverse from the end of the
746 * [PR #202](https://github.com/rust-lang/regex/pull/202):
747 The inner loop of the DFA was heavily optimized to improve cache locality
748 and reduce the overall number of instructions run on each iteration. This
749 represents the first use of `unsafe` in `regex` (to elide bounds checks).
750 * [PR #200](https://github.com/rust-lang/regex/pull/200):
751 Use of the `mempool` crate (which used thread local storage) was replaced
752 with a faster version of a similar API in @Amanieu's `thread_local` crate.
753 It should reduce contention when using a regex from multiple threads
755 * PCRE2 JIT benchmarks were added. A benchmark comparison can be found
756 [here](https://gist.github.com/anonymous/14683c01993e91689f7206a18675901b).
757 (Includes a comparison with PCRE1's JIT and Oniguruma.)
758 * A bug where word boundaries weren't being matched correctly in the DFA was
759 fixed. This only affected use of `bytes::Regex`.
760 * [#160](https://github.com/rust-lang/regex/issues/160):
761 `Captures` now has a `Debug` impl.