-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add BBE for Regexp
find operations
#5677
Conversation
ba24c01
to
b386863
Compare
import ballerina/lang.regexp; | ||
|
||
public function main() { | ||
string logContent = string ` |
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.
imo, its better to include non matching example as well
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.
There are other non-matching info and warn logs in this logContent
} | ||
|
||
function printGroupsWithinLog(regexp:Groups logGroup) { | ||
// The first element in the `logGroup` is the entire matched string. |
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.
Similarly wouldn't it be better if we say why any of these values could be nil
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.
I don't think we should do explicit null checks here, because since there is a match the expected groups should be there. WDYT?
06a0045
to
d88fe10
Compare
Co-authored-by: Maryam Ziyad <[email protected]>
Quality Gate passedIssues Measures |
fbe08d7
Purpose
Part of ballerina-platform/ballerina-dev-website#9318