SEARCHES TEXT AND RETURNS VALUE

Searches a block of text for a needle string using configurable match modes (contains, begins_with, ends_with) and returns the matched or extracted value. Use this worker to locate substrings within free-form text fields, optionally scoping the search to a character-offset window and toggling case sensitivity.

When to use

Classification: process.

Tagged: begins_with, case_sensitivity, contains, ends_with, needle, offset, parse, process.

Inputs

Label ID Type Default Required Description
Text To Be Parsed texttobeparsed text   The full input text (string/blob) that will be searched; pipe in any free-form text field whose content you want to interrogate.
Begin Offset begin_offset scalar 0   Zero-based character index at which the search window starts (default 0 = beginning of text); increase to skip a known prefix before matching.
Ending Offset ending_offset scalar -1   Character index at which the search window ends, inclusive; default -1 means search to the end of the text.
Search Type search_type string contains   Match strategy to apply: ‘contains’ (needle appears anywhere in window), ‘begins_with’ (window starts with needle), or ‘ends_with’ (window ends with needle); defaults to ‘contains’.
Needle String needle_string string   The substring to search for within the text window; must be provided for the worker to return a meaningful result.
Case Sensitivity case_sensitivity string no   Controls whether the match is case-sensitive (‘yes’) or case-insensitive (‘no’); defaults to ‘no’ (case-insensitive).
Split Needle Token split_needle_token string   Optional delimiter used to split the needle string into multiple sub-tokens before matching; leave blank to treat the needle as a single literal string.
Match All match_all string no    
True Text true_text string yes    
False Text false_text string no    

Outputs

Label ID Type Description
text_search_output_1 text_search_output_1 text The extracted or matched text segment returned by the search; contains the relevant portion of the input text if the needle was found, or an empty/null value if no match was detected.

Disciplines

  • data.dataset.transform

Auto-generated from transformation schema. Worker id: text_search. Schema hash: ec944aac3ebd. Hand-curated docs in workerexamples/ override this page when present.