Unstructured Text
Add Line Numbers
Put a number in front of every line of your text.
When to use it
Typical uses: Numbering steps in instructions or recipes; Referencing lines in code reviews or scripts; Creating numbered lists for documents.
In a pipeline
Text InputAdd Line NumbersText Output
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Text column | select | — | Text |
| Start at | number | — | 1 |
| Separator | select | — | dot |
| Generate New Column | checkbox | — | false |
| New Column Name | text | — | Default: <column> Result |
| Insert After | select | — | After the column |
| When a value cannot be converted | select | — | stop |
Example
Add Line Numbers: an example
- Start at=1
- Separator=1. line
| Text |
|---|
| Preheat the oven Mix the flour and sugar Add the eggs |
| Text |
|---|
| 1. Preheat the oven 2. Mix the flour and sugar 3. Add the eggs |
Worth knowing
- Are blank lines numbered? Yes. Remove them first with Remove Empty Lines if you want continuous numbering.
- Can I start from zero? Yes. Set “Start at” to 0.
- How do I remove line numbers? Use Find and Replace with a regular expression such as ^\s*\d+\. .
- Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.