-
-
Notifications
You must be signed in to change notification settings - Fork 209
feat: add key_match5 function for matcher #315
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
Conversation
|
@Nekotoxin please review |
| re_pattern = r"{[^/]+}" | ||
| key2 = re.sub(re_pattern, r"[^/]+", key2) | ||
|
|
||
| return regex_match(key1, "^" + key2 + "$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BustDot Please pre-compile the regular expression at the beginning of the file to improve efficiency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
# [1.25.0](v1.24.0...v1.25.0) (2023-08-30) ### Features * add key_match5 function for matcher ([#315](#315)) ([7d29109](7d29109))
|
🎉 This PR is included in version 1.25.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [1.25.0](casbin/pycasbin@v1.24.0...v1.25.0) (2023-08-30) ### Features * add key_match5 function for matcher ([casbin#315](casbin#315)) ([7d29109](casbin@7d29109))
refer to: casbin/casbin#910
casbin/casbin#1177