regex icon indicating copy to clipboard operation
regex copied to clipboard

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

Results 116 regex issues
Sort by recently updated
recently updated
newest added

It turns out that when a regex is _deterministic_, the NFA simulation can be implemented much more efficiently because it only needs to keep track of one set of capture...

enhancement
fix-incoming

When you negate a character class when Unicode mode is disabled, the negation includes all _bytes_ except for what's in the class. Namely, the only way to write a character...

bug
fix-incoming

I am not completely sure if this change introduces some unwanted side effects, as there seems to be support for the 'Script' property, which is not the case for the...

Viewing `Regex` types under a debugger on Windows can be a bit difficult to comprehend. This change adds Natvis visualizations for a few of the common `Regex` types to help...

In the HIR translation stage, if in Unicode and ignore-case mode, case folding interval sets can take exceedingly long. This PR optimises case folding through the following techniques: 1. Determining...

this change is useful because of the proposed addition of the `once_cell` api into std. users using the `once_cell` pattern will find it easier to swap to the `std` versions...

#### Describe your feature request *I'm unsure if I should report this as a feature request for a currently-missing "optimization", or a performance bug due to a missed optimization. The...

enhancement
fix-incoming

### Discussed in https://github.com/rust-lang/regex/discussions/890 Originally posted by **Guillermogsjc** July 19, 2022 Hi, to match efficiently large amounts of alternations, I guess it is interesting to trigger `aho_corasick` variant here https://github.com/rust-lang/regex/blob/9ca3099037dcb2faf1b49e6493f4c758532f2da1/src/exec.rs#L91...

enhancement

These are the fuzzers used to find [CVE-2022-24713](https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8). Effectively, it just marks all AST members as Arbitrary when the fuzzer feature is enabled, then generates ASTs which are then converted...

[`#[non_exhaustive]`](https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute) was added at [Rust 1.40](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1400-2019-12-19). Since MSRV of this project is 1.41.1, the attribute is available. This PR replaces `__Nonexhaustive` enum variant hack with the attribute. The benefits to...