Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.github/workflows/ | H | 03-May-2022 | - | 86 | 75 | |
src/ | H | 03-May-2022 | - | 601 | 363 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
.clog.toml | H A D | 01-Jan-1970 | 862 | 24 | 20 | |
.gitignore | H A D | 01-Jan-1970 | 320 | 11 | 8 | |
CHANGELOG.md | H A D | 01-Jan-1970 | 825 | 27 | 12 | |
Cargo.toml | H A D | 01-Jan-1970 | 1 KiB | 30 | 28 | |
Cargo.toml.orig-cargo | H A D | 01-Jan-1970 | 533 | 22 | 19 | |
LICENSE | H A D | 01-Jan-1970 | 1 KiB | 20 | 16 | |
README.md | H A D | 01-Jan-1970 | 1.7 KiB | 39 | 30 |
README.md
1# matchers 2 3Regular expression matching on Rust streams. 4 5[![Crates.io][crates-badge]][crates-url] 6[![Documentation][docs-badge]][docs-url] 7[![MIT licensed][mit-badge]][mit-url] 8[![CI][ci-badge]][ci-url] 9 10[crates-badge]: https://img.shields.io/crates/v/matchers.svg 11[crates-url]: https://crates.io/crates/matchers 12[docs-badge]: https://docs.rs/matchers/badge.svg 13[docs-url]: https://docs.rs/matchers/0.1.0 14[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg 15[mit-url]: LICENSE 16[ci-badge]: https://github.com/hawkw/matchers/actions/workflows/ci.yml/badge.svg 17[ci-url]: https://github.com/hawkw/matchers/actions/workflows/ci.yml 18 19## Overview 20 21The [`regex`] crate implements regular expression matching on strings and byte 22arrays. However, in order to match the output of implementations of `fmt::Debug` 23and `fmt::Display`, or by any code which writes to an instance of `fmt::Write` 24or `io::Write`, it is necessary to first allocate a buffer, write to that 25buffer, and then match the buffer against a regex. 26 27In cases where it is not necessary to extract substrings, but only to test whether 28or not output matches a regex, it is not strictly necessary to allocate and 29write this output to a buffer. This crate provides a simple interface on top of 30the lower-level [`regex-automata`] library that implements `fmt::Write` and 31`io::Write` for regex patterns. This may be used to test whether streaming 32output matches a pattern without buffering that output. 33 34Users who need to extract substrings based on a pattern or who already have 35buffered data should probably use the [`regex`] crate instead. 36 37[`regex`]: https://crates.io/crates/regex 38[`regex-automata`]: https://crates.io/crates/regex-automata 39