-
Notifications
You must be signed in to change notification settings - Fork 45
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
Consolidate regex patterns #2
Comments
Hey, Thanks for this! Just tested it and had to add some slashes as go does not like part of the regex
Results though did not work for me though as i am still new to go i am not sure on the best way around this myself.
|
According to this comment it looks like you can use backticks instead of double quotes to surround the regex pattern and then you won't have to escape the slashes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Specifications
Issue details
I believe there are a few S3 endpoints that weren't being matched by the existing patterns. All of the S3 endpoints are listed here and boil down to either:
The pattern I created is basically 2 patterns connected with an OR "|".
Notes
Pattern 1
Matches on:
Pattern 2
Matches on:
Also matches on all S3 endpoints:
Pattern 1 & 2
I've split this into 2 parts in case you need to handle the 2 cases differently, but if you don't just use this big guy.
Conclusion
If you'd like to learn about how these work or edit them, here's the regexr I made. You can also try it on regex101 which has golang support.
The text was updated successfully, but these errors were encountered: