#pattern-matching #pattern #matching #wildcard #match

patmatch

A configurable pattern matching / wildcard matching library

4 releases

0.1.3 Apr 6, 2021
0.1.2 Apr 5, 2021
0.1.1 Apr 4, 2021
0.1.0 Apr 4, 2021

#2024 in Algorithms

MIT license

18KB
360 lines

patmatch

A configurable pattern matching / wildcard matching library for Rust.


lib.rs:

A configurable pattern matching (also known as globbing) library.

The general use of this library is to compile Patterns, then use them. For example:

use patmatch::{Pattern, MatchOptions};
let pat = Pattern::compile("*.png", MatchOptions::ALL);
assert!(pat.matches("file.png"));
assert!(!pat.matches("file.jpeg"));

Dependencies

~105KB