FILE GREP SAVE WORKER¶
Applies a regex pattern to a platform file attachment, either keeping (include) or discarding (exclude) matching lines, then saves the result back to the platform. Use this worker to filter large text-based simulation deck or log files by keyword before downstream processing.
When to use¶
Tagged: exclude, file_filter, filter, grep, include, keyword, regex, simulation.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Attachment ID | file_id | text | — | ✓ | Platform attachment ID of the source text file to be filtered; must reference an existing uploaded file in the platform. |
| Pattern | pattern | text | — | ✓ | Regular expression pattern used to match lines in the file; e.g. ‘*ELEMENT’ to target LS-DYNA keyword lines. |
| Include Exclude | include_exclude | select | exclude | ✓ | Controls filter direction: ‘exclude’ removes lines matching the pattern and keeps the rest (default); ‘include’ keeps only lines matching the pattern. |
| Return Type Exclude | return_type | select | text | ✓ | Output format: ‘text’ returns the filtered content as plain text (default); ‘attachment’ saves the result as a new platform file attachment and returns its ID. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| Attachment Id | attachment_id | integer | Platform attachment ID (integer) of the newly saved file containing the filtered content; populated only when return_type is set to ‘attachment’. |
Disciplines¶
- cae.preprocessing.deck_authoring
- data.io.file
Auto-generated from platform schema. Worker id: file_grep_keyword_save. Schema hash: 7d280421c49c. Hand-curated docs in workerexamples/ override this page when present.