dazinator / DotNet.Glob

A fast globbing library for .NET / .NETStandard applications. Outperforms Regex.
MIT License
363 stars 27 forks source link

Double check character class logic #84

Closed dazinator closed 3 years ago

dazinator commented 3 years ago

Note to self to double check character class logic think it makes sense to align with the following in terms of how this pattern would be parsed: [][!]

https://man7.org/linux/man-pages/man7/glob.7.html#:~:text=Globbing%20is%20the%20operation%20that,string%2C%20including%20the%20empty%20string.

dazinator commented 3 years ago

Yep all looks good https://github.com/dazinator/DotNet.Glob/blob/develop/src/DotNet.Glob/GlobTokeniser.cs#L153

In addition to the Unix spec I had built in ability to escape ] with ]]. E.g to match either A or ] you can use the expression [A]]