-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Cleaned up the matchPattern regex code #14552
Cleaned up the matchPattern regex code #14552
Conversation
knobunc
commented
Jun 9, 2017
- Changed it to use raw strings to reduce the leaning-toothpick syndrome from all of the necessary escaping
- Changed it to use \A and \z around the regex, so that if the regex is put into multi-line mode with (?m) then it will match the whole string
- Changed it so that the () around their regex is (?:) to make it non-capturing
- Changed it to use raw strings to reduce the leaning-toothpick syndrome from all of the necessary escaping - Changed it to use \A and \z around the regex, so that if the regex is put into multi-line mode with (?m) then it will match the whole string - Changed it so that the () around their regex is (?:) to make it non-capturing
b40944d
to
ff3b23c
Compare
[test] @openshift/networking PTAL |
*cough* unit tests *cough* |
Added testing of the patternMatch function that can be called from the template. This does some basic positive and negative testing of patterns, and then has some more sophisticated tests to make sure the additional structure we add around the regex to anchor it to match the entire string does not misbehave.
Evaluated for origin test up to 35da20c |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2073/) (Base Commit: 0f82878) |
LGTM |
1 similar comment
LGTM |
@danwinship thanks for the hint :-) Done. |
[merge] |
[merge] last flaked on #14353, logs: https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/975/ |
Evaluated for origin merge up to 35da20c |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/984/) (Base Commit: a5b8471) (Image: devenv-rhel7_6350) |