MCPcopy Index your code
hub / github.com/becheran/wildmatch

github.com/becheran/wildmatch @v2.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.6.1 ↗ · + Follow
29 symbols 33 edges 2 files 6 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

wildmatch

build status docs downloads crate license codecov

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.
  • No escape characters are defined.

Can also be used with a custom match pattern to define own wildcard patterns for single and multi-character matching.

For example the pattern ca? will match cat or car. The pattern https://* will match all https urls, such as https://google.de or https://github.com/becheran/wildmatch.

The following table shows a performance benchmarks between wildmatch, regex,glob, and the regex_lite libraries:

Benchmark wildmatch regex glob regex_lite
compiling/text 462 ns 39,714 ns 1,470 ns 13,210 ns
compiling/complex 190 ns 153,830 ns 238 ns 60 ns
matching/text 186 ns 4,065 ns 456 ns 6,097 ns
matching/complex 310 ns 16,085 ns 1,426 ns 3,773 ns

The library only depends on the rust stdlib.

See the documentation for usage and more examples.

Core symbols most depended-on inside this repo

is_match
called by 4
src/lib.rs
matches
called by 4
src/lib.rs
compiling
called by 0
benches/patterns.rs
matching
called by 0
benches/patterns.rs
fmt
called by 0
src/lib.rs
new
called by 0
src/lib.rs
new_case_insensitive
called by 0
src/lib.rs
pattern
called by 0
src/lib.rs

Shape

Function 19
Method 9
Class 1

Languages

Rust100%

Modules by API surface

src/lib.rs27 symbols
benches/patterns.rs2 symbols

For agents

$ claude mcp add wildmatch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page