Skip to content
This repository has been archived by the owner on Jan 3, 2022. It is now read-only.
/ fastwildcard Public archive

A fast and robust wildcard matching library for .NET Standard.

License

Notifications You must be signed in to change notification settings

fastwildcard/fastwildcard

Repository files navigation

FastWildcard

Project archived

Use one of these alternatives instead:

You can also use a Regex, however it won't be accurate to the wildcard pattern behaviour in these "more official" libraries above.

Last time I checked, Microsoft don't provide an official implementation however these options work very well and have been tested throughly within this project. Examples on how to use all of them can be found within these tests.

There are other NuGet libraries that perform similar operations, however when I last worked on the tests for this project and ran them against those libraries, they were all buggy in one way or another.

On that topic, the reason why this project is archived is that I couldn't get past this bug. It looks like the fix requires a rewrite of the algorithm, which to be honest is not something I'm interested in doing, and no-one else has volunteered. If you would like to do this, please let me know. (I also found myself more interested and proud of the testing code and infrastructure in this project than the actual wildcard matching algorithm!)

Thank you to everyone who used this project!

NuGet Build status Codacy Badge codecov Semantic Versioning

A wildcard matching library for .NET Core 2.x, and .NET Standard 1.3/2.0.

  • Robust: extensively unit tested to be reliable and predictable - no edge cases!
  • Fast: developed with regular benchmarking and performance analysis to provide the best speed possible!

Pattern syntax

  • '*' matches 0 or more characters
  • '?' matches 1 character

For examples, please review some FastWildcard.Tests!

Benchmarks

Cross-library comparison

Cross-library benchmark notes:

  • Executed against FastWildcard 3.0.0 on an Azure Standard F2s virtual machine
  • Compiled RegEx is excluded as under the full CLR its execution time is extremely high
  • Values for WildcardMatch are an average as it encountered execution errors

Complete test execution log and reporting spreadsheet. Or run FastWildcard.Performance yourself!

Support details

Supports .NET Standard 1.3 and higher.