Extract text
Return the text before, after or between markers.
Command in the String toolkit · id ooa.string/extract_text · 13 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Source text. | |
| Before | String | No | Return text before this marker. | |
| After | String | No | Return text after this marker. | |
| Trim | Boolean | No | true | Trim whitespace from the result. |
| After occurrence | Number | No | 1 | Which occurrence of the 'after' marker to start from (1 = first). |
| Before occurrence | Number | No | 1 | Which occurrence of the 'before' marker to stop at (1 = first). |
| Ignore case | Boolean | No | false | Find the markers without regard to upper/lower case. |
| If not found | String | No | empty | Result when a marker is missing: empty text, or the whole source text. |
| Maximum length | Number | No | Keep at most this many characters of the result. | |
| Remove line breaks | Boolean | No | false | Remove line breaks from the result. |
| Until | String | No | marker | Where the result ends when the 'before' marker is empty or not found: as before (marker), at the end of the line, or at the end of the text. |
| Markers | String | No | either | G1 (AA parity): with both markers given, whether either one found is enough, or both must be found (else the marker is missing). |
| Length mode | String | No | up_to | G1 (AA parity): keep up to max_length characters, or exactly that many (a shorter result counts as not found). |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | String | Extracted text, empty when a marker is missing. |