Skip to content

Return empty text handle on no match for RegexTextExtractor #10105

@bglearning

Description

@bglearning

Is your feature request related to a problem? Please describe.
If RegexTextExtractor doesn't find a match, it returns an empty dict {} which cannot be processed further in the pipeline (?), essentially dead-ends.

Describe the solution you'd like
Would be good to return {"captured_text": ""} instead which can then be processed downstream (e.g. through a ConditionalRouter that checks captured_text). Alternatively, an explicit no_match output could also be fine.

The run method docstring mentions return_empty_on_no_match (which when False would return the empty match) but that is not a param for the class.

Metadata

Metadata

Assignees

Labels

P1High priority, add to the next sprint

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions