/regex-intersect

a Rust library that finds out if two regexes have a non-empty intersection

Primary LanguageRustApache License 2.0Apache-2.0

Regex Intersect

github crates.io docs.rs build status

This is a Rust library that finds out if two regexes have a non-empty intersection.

Dependency

[dependencies]
regex-intersect = "1.2.0"

For most recent version see crates.io

Usage

Import and use non_empty:

use regex_intersect::non_empty;
assert!(non_empty("a.*", "ab.*cd").expect("regex expressions should parse"))

Copyright

Copyright (c) 2022 @jondot. See LICENSE for further details.