Unwrap list items

Unwrap list items by stripping a literal Before string from each line's start and a literal After string from each line's end. Matching is via `startsWith` / `endsWith` - literal, not regex. Inverse of Wrap when you supply the same two strings.

Input
Ready
Output
Live

Literal-string prefix/suffix stripping

Two independent string checks per line: if the line starts with Before, slice off that prefix. If the line ends with After, slice off that suffix. Both are literal - no regex, no character-class behaviour. Empty Before or After is simply skipped.

Because the two checks are independent, a line matching only one side still gets partial stripping. `<li>Item</li>` with Before `<li>` and After `</li>` strips both. `<li>Item` (missing closing tag) strips only the Before. `Item</li>` strips only the After.

Use this for reversing Wrap, stripping HTML list-item markup, or peeling off CSV quote+comma fragments. For character-class stripping (any of a set), use trim or Remove prefixes. For regex-based pattern removal, use Replace.

How to use unwrap list items

  1. 1Paste your list into the input panel
  2. 2Set Before to the literal leading string (default `<`)
  3. 3Set After to the literal trailing string (default `>`)
  4. 4Each line is stripped independently - either side that matches is removed
  5. 5Mirrors the inputs to Wrap

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this tool actually does

Literal-string startsWith / endsWith slicing, nothing more.

Literal match, not regex

Before `<li>` matches the literal five characters. No metacharacter behaviour. If you need regex, use Replace.

Independent sides

Before and After are checked separately. A line missing one side still has the other stripped. Means you can unwrap asymmetric data cleanly.

Empty field is skipped

Leave Before blank to only strip the After suffix (or vice versa). Effectively the same as Remove prefixes / Remove suffixes for literal strings.

Blank lines pass through

An empty line matches neither Before nor After, so it is emitted unchanged. Blank lines are never auto-removed.

Only one layer per run

A doubly-wrapped `<li><p>Item</p></li>` would need two runs with different Before/After pairs, or a single run of Replace with Regex.

Worked example

Before `<li>` and After `</li>` strip HTML list-item markup.

Input
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
Output
Item 1
Item 2
Item 3

Settings reference

How each option shapes the output using the sample above.

Setting What it does Effect on the sample
Before: `<li>`, After: `</li>` Both sides stripped `<li>Item 1</li>` → `Item 1`
Before: `<li>`, After: empty Only leading tag stripped `<li>Item 1</li>` → `Item 1</li>`
Before: empty, After: `</li>` Only trailing tag stripped `<li>Item 1</li>` → `<li>Item 1`
Before: `XX` (no match) Line passes through unchanged `<li>Item 1</li>` stays intact
Blank line (automatic) No match on either side Blank stays blank

FAQ

Is matching literal or regex?
Literal. `startsWith` and `endsWith` are used - no pattern syntax. For regex-based stripping, use Replace with Regex mode on.
What if Before matches but After does not?
Only the Before is stripped. The two sides are independent - asymmetric matches are fine.
Does it remove blank lines?
No. Blank lines have no Before or After to match, so they pass through unchanged. Use Remove empty lines separately if needed.
How is this different from Trim?
trim strips a character class (any of a set of characters). This tool strips literal strings. Different use cases: trim handles bullet lists; this handles HTML tags or literal wrappers.
Does it strip multiple layers?
No - one layer per run. For nested wraps, run the tool multiple times with different Before/After values, or use Replace with a regex like `^(<li>|<p>)+` / `(</li>|</p>)+$`.