-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defect: Patterns with Unsupported non alph-numeric characters fail to match #32
Comments
Currently the non-alphanumeric characters that are supported are restricted to this subset: https://github.com/dazinator/DotNet.Glob/blob/develop/src/DotNet.Glob/GlobStringReader.cs#L27 These characters are ones that are legal for file / directory paths. Are you looking to match text within a text file or something? |
I was looking to find the equivalent of the Visual Basic or PowerShell like operators so yes. :) |
As per #31 - the issue is that when the pattern is tokenised, if the pattern contains a character that isn't in the allowed / supported subset of characters, then the token is silently omitted from the tokenised pattern. Then when you go on to do a match, you are actually matching now against a pattern that has those unsupported tokens omitted. I am thinking I can address this in a couple of ways.
The current constraints on the characters you can use are optimised for path / directory matching. Having an option to relax these constraints will allow you to use DotNet.Glob in a fashion more similar to VB's Like. |
I have just pushed |
It appers that a patterns with escape sequences fail:
DotNet.Globbing.Glob.Parse("\"Stuff*").IsMatch("\"Stuff")
: falseDotNet.Globbing.Glob.Parse("\0Stuff*").IsMatch("\0Stuff")
: falseDotNet.Globbing.Glob.Parse("\nStuff*").IsMatch("\nStuff")
: falseDotNet.Globbing.Glob.Parse("\r\nStuff*").IsMatch("\r\nStuff")
: falseThe text was updated successfully, but these errors were encountered: