Skip to main content

Extract Text Content

Command description

Extracts matching content from text and saves the results as a list of strings. Built-in modes support numbers, phone numbers, email addresses, and ID numbers; custom Python regular expressions are also supported.

Command Input Parameters

input parametersInput parameter typeDescription
TextanySource content. List items are joined with newline characters; other values are converted to strings before extraction.
Extraction ModeenumNumber, Phone Number, Email Address, ID Number, Custom Content
Regular ExpressionstrRequired when Extraction Mode is Custom Content

Command Output Parameters

Output parametersOutput parameter typeDescription
Extraction Resultlist[str]Matched text list, empty list when no content is matched

Note

In Number mode, the command extracts signed integers and decimals, including numbers adjacent to letters. For example, Order A1024 amount CNY 29.8 produces 1024 and 29.8.

In Custom Content mode, Regular Expression must be a valid Python regular expression. Each result is the complete match, even when the expression contains capture groups.

AI Workflow Generation Notes

  • The output is list[str]. Include Regular Expression only when Extraction Mode is Custom Content.