List Item Prefix Remover

Splits a list on a configurable separator (newline, comma, or a custom delimiter), strips a chosen prefix from the start of any item that begins with it, and rejoins it. Unlike the string category's newline-only Line Prefix Remover, this also works on comma- or custom-delimited lists. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

Lists exported from another tool often arrive with a repeated prefix on every line, like a bullet marker, a namespace, or a table alias, that you need stripped before reusing the data.

This tool removes a chosen prefix from every list item that has it, in one pass, with a configurable separator for lists that aren't newline-delimited.

What Is List Item Prefix Remover?

A bulk text tool that splits input into items on a chosen separator, strips an exact-match prefix from the start of each item that has it, and rejoins the result.

It generalizes the string category's Line Prefix Remover by adding separator choice, for lists that aren't strictly one item per line.

How List Item Prefix Remover Works

The input is split into items using the selected separator (newline, comma, or a custom delimiter).

Each item is checked with an exact-match `startsWith` test; if it matches, the prefix's character length is sliced off the front, otherwise the item is left as-is, then everything is rejoined.

When To Use List Item Prefix Remover

Use it to clean up a pasted list that has a repeated bullet, tag, or code prefix you no longer need.

It's useful for undoing a batch prefix you (or another tool) added earlier in a workflow.

Features

Advantages

  • Only strips items that actually start with the prefix, so mismatched items are never corrupted.
  • Works on newline-, comma-, or custom-delimited lists, not just newline-separated ones.
  • Exact, predictable case-sensitive matching with no surprising fuzzy behavior.

Limitations

  • Matching is case-sensitive and exact; it won't strip a prefix that differs by case or has extra surrounding whitespace.
  • Only removes the prefix once from the very start of each item, it won't repeatedly strip a prefix that appears multiple times in a row.

Examples

Stripping a bullet marker from a newline list

Input

- apples
- bananas
- cherries

Output

apples
bananas
cherries

Separator is newline; the prefix "- " is removed from each item since all three start with it.

Only some items match

Input

TODO: fix bug,review PR,TODO: write docs

Output

fix bug, review PR, write docs

Separator is comma; "review PR" doesn't start with "TODO: " so it's left unchanged while the other two items are stripped and the result is rejoined with ", ".

Best Practices & Notes

Best Practices

  • Copy the exact prefix text, including any trailing space, from one of the items to avoid a case or whitespace mismatch.
  • Use List Separator Normalizer first if the source list mixes separator styles inconsistently.

Developer Notes

Uses `String.prototype.startsWith()` per item after splitting via the shared `splitListItems` helper; only a true prefix match is sliced off with `slice(prefix.length)`, everything else passes through untouched.

List Item Prefix Remover Use Cases

  • Removing a repeated "TODO: " or "- " marker from a pasted checklist
  • Stripping a table alias prefix like "users." from a list of column names
  • Undoing a batch prefix applied earlier by List Item Prefix Adder

Common Mistakes

  • Typing the prefix with different casing than the actual list items, causing no matches to be found.
  • Forgetting to include a trailing space in the prefix field when the list items have one after the marker.

Tips

  • If you're not sure of the exact prefix, copy-paste it directly from one list item into the prefix field.
  • Pair with List Item Suffix Remover to clean both ends of every item in one workflow.

References

Frequently Asked Questions