Repository navigation
fix: RegexTextExtractor bool var to change output from { } to {"captured_text": ""} - #10152
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Pull Request Test Coverage Report for Build 19861357461Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
RegexTextExtractor bool var to change output from { } to {"captured_text": ""}
davidsbatista
marked this pull request as ready for review
November 27, 2025 14:32
davidsbatista
requested review from
bglearning and
vblagoje
and removed request for
a team
November 27, 2025 14:32
Contributor
Author
|
@bglearning happy to also have your feedback |
vblagoje
requested changes
Dec 2, 2025
vblagoje
left a comment
Member
There was a problem hiding this comment.
Almost there, minor suggested changes would be nice to have
|
|
||
| :param regex_pattern: | ||
| The regular expression pattern used to extract text. | ||
| The pattern should include a capture group to extract the desired text. |
Member
There was a problem hiding this comment.
:param return_empty_on_no_match missing
| return {} | ||
| result = self._extract_from_text(last_message.text) | ||
| return RegexTextExtractor._build_result(result) | ||
| return RegexTextExtractor._build_result(self, result) |
Member
There was a problem hiding this comment.
this should be self, let's fix it.
| :returns: | ||
| - If match found: `{"captured_text": "matched text"}` | ||
| - If no match and `return_empty_on_no_match=True`: `{}` | ||
| - If no match and `self.return_empty_on_no_match=True`: `{}` |
Member
There was a problem hiding this comment.
- if no match and
self.return_empty_on_no_match=False:{"captured_text": ""}?
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
return_empty_on_no_matchparameter (defaultTrue) toRegexTextExtractor.__init__()False, the component returns{"captured_text": ""}instead of{}when no regex match is found.A deprecation warning is emitted when using the default behaviour (
return_empty_on_no_match=True), indicating that future releases will change the default to return{"captured_text": ""}instead of{}.Existing pipelines using
RegexTextExtractorcontinue to work without changes, as the default behaviour remainsreturn_empty_on_no_match=True.How did you test it?
Added tests to assert the use of the new variable, and all existing tests pass
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.