-
Notifications
You must be signed in to change notification settings - Fork 60
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
Unexpected results with escaping #36
Comments
Additionally, should the Compile documentation be updated to include |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
UPDATE: Looks like all of the multi-term patterns were not working as expected due to spacing. They all work as expected when that's fixed. All that leaves is the first pattern I put where I would expect it not to match.
I am building a single string out of a list of glob patterns I want to match to pass into glob.Compile().
An example might be
glob.Compile("{"+strings.Join(globPatterns, ",")+"}", '.')
It seems though it may be impossible to have a
,
in one of the patterns. I wrote a simple test table to demonstrate what my assumption would be and what the actual results were in a comment above each test case. The last case I listed also surprised me, because the Compile documentation suggests that\
should escape{
and}
.Which prints the following:
Are my assumptions in my comments correct? If so, how would you suggest they be addressed? I would be willing to take a crack at it if you would like.
The text was updated successfully, but these errors were encountered: