#matching #star #string-matching #glob #questionmark

wildescape

Simple string matching with questionmark, star wildcard operator and an escaped character

1 unstable release

0.1.0 Sep 5, 2023

#1674 in Algorithms

Download history 1/week @ 2023-12-18 6/week @ 2023-12-25 13/week @ 2024-01-01 2/week @ 2024-01-08 4/week @ 2024-02-19 25/week @ 2024-02-26 8/week @ 2024-03-04 6/week @ 2024-03-11 5/week @ 2024-03-18 6/week @ 2024-03-25 44/week @ 2024-04-01

63 downloads per month
Used in 3 crates (via logisheets_controller)

MIT license

18KB
365 lines

wildescape

build status docs downloads crate license codecov

This is a fork of wildmatch, but with an escape character defined.

Match strings against a simple wildcard pattern. Tests a wildcard pattern p against an input string s. Returns true only when p matches the entirety of s.

See also the example described on wikipedia for matching wildcards.

  • ? matches exactly one occurrence of any character.
  • * matches arbitrary many (including zero) occurrences of any character.
  • ~ is the escaped character for matching ?, * and ~.

No runtime deps