Skip to content
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

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

poorna2152
Copy link
Contributor

import ballerina/lang.regexp;

public function main() {
string logContent = string `
Copy link
Contributor

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

Copy link
Contributor Author

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

examples/regexp-find-operations/regexp_find_operations.bal Outdated Show resolved Hide resolved
examples/regexp-find-operations/regexp_find_operations.bal Outdated Show resolved Hide resolved
}

function printGroupsWithinLog(regexp:Groups logGroup) {
// The first element in the `logGroup` is the entire matched string.
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link

sonarcloud bot commented Oct 21, 2024

@poorna2152 poorna2152 added this pull request to the merge queue Oct 25, 2024
Merged via the queue into ballerina-platform:master with commit fbe08d7 Oct 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants