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

Closes https://github.com/rust-lang/regex/issues/756. This PR introduces a Python script named `public-types-tests.py` that manages marker traits for the public API types. Following the discussion in https://github.com/rust-lang/regex/issues/756, this script is responsible for two...

here is the simple example from doc.rs, just modify the group name to chinese https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3775118597eecd8c8e4a98475917b9d1 throw this error: error: invalid capture group character

enhancement

#### What version of regex are you using? 1.5.6 #### Describe the bug at a high level. When building a `RegexSet`, with the `perf-literal` feature enabled, `aho-corasick` isn't used to...

enhancement

This program ```rust extern crate regex; // 1.0.5 use regex::Regex; fn main() { let text = "foo\nbar\nbaz\n"; let re = Regex::new(r#"(?m)^[ \n]*[a-z]+[ \n]*$"#).unwrap(); for c in re.captures_iter(text) { println!("{:?}", (c.get(0).unwrap().start(),...

bug
fix-incoming

This is more-or-less a continuation of issue #25 (most of which is actually [here](https://github.com/rust-lang/rust/issues/14015)). # Preface I don't personally have an urgent need for this functionality, but I do think...

enhancement
question

#### What version of regex are you using? Latest If it isn't the latest version, then please upgrade and check whether the bug is still present. #### Describe the bug...

doc

A lot of my use cases for regex involve extracting some information from text with a simple pattern, where full parsing would be overkill. In this scenario I generally just...

enhancement
question

Would it make sense to provide `regex::bytes::escape` similar to `regex::escape` but so that it could accept any `&[u8]` not `&str`? Currently the quick workaround is to manually collect bytes into...

enhancement

Consider [this program](http://play.rust-lang.org/?gist=37cf80f93df9c08fafe28d919cb64104&version=stable&mode=debug): ```rust extern crate regex; use regex::bytes::Regex; fn main() { let re = Regex::new("").unwrap(); for m in re.find_iter("☃".as_bytes()) { println!("{:?}", (m.start(), m.end())); } } ``` its output is...

bug

(Probably blocked on #656 restructuring, and potentially better exposed as part of regex-automata.) TL;DR: In the advanced/"lower level" impl section, or perhaps on applicable `Regex` types provided by regex-automata: ```rust...