- Before this lesson
- Variables
- You will learn to
- Clean up text with String Operation
- Split text into a list
- Find or replace a pattern with Regex
- Sample files
- variables-and-text.station.json
Text from forms, files and screens is rarely tidy. String Operation cleans it; Regex finds patterns.
String Operation
Choose an Operation, give an Input (usually {{variable}}) and a Save To Variable.
| Operation | Example input | Result |
|---|---|---|
| trim | " example ltd " | example ltd |
| uppercase / lowercase | example ltd | EXAMPLE LTD |
| replace (Find, Replace With) | example ltd, ltd → Limited | example Limited |
| length | example ltd | 11 |
| substring (Start, Length) | INV-2026-0042, 4, 4 | 2026 |
| concat (Append) | INV- + 0042 | INV-0042 |
| split (Delimiter) | apple,pear,plum and , | a list of three items |
Regex
A regular expression describes a pattern. Regex can test (true or false), match the first occurrence, match_all occurrences, or replace.
| Goal | Pattern |
|---|---|
| Digits only | \d+ |
| An invoice number like INV-2026-0042 | INV-\d{4}-\d{4} |
| The file extension | [^.]+$ |
The sample
variables-and-text.station.json trims a customer name, changes it to capitals, counts the characters, replaces a word and calculates a total. Import it and run it.
Activities in this lesson
String Operation · Regex · Log
Saved only in this browser.
Workflow engine-tested. The sample workflow was executed with the macOS Station engine (StationCore) without the user interface. UI steps are source-verified. Written against RPAi Station for macOS 0.1.0 (1) (RPAi_Station_2.0 @ port/macos 9864e96) and the Windows source (RPAi_Station_2.0 @ codex/native-station e68f16d). Reviewed 2026-11-30. UI labels may differ slightly in other versions; see versions and changes.