Remove Prefix & Suffix Tool
Remove a specified prefix and/or suffix from every line that actually starts or ends with it, leaving other lines unchanged.
Result:
How to Remove a Prefix or Suffix
Paste your list into the main text box, then specify the exact text you want stripped from the beginning (prefix) or end (suffix) of each line. Click the button and every line is checked individually — a prefix is only removed from lines that actually START with that exact text, and a suffix is only removed from lines that actually END with it. Lines that don't have the prefix or suffix are left completely unchanged.
Example
Removing prefix - from the lines - Apples, Bananas, and - Cherries produces Apples, Bananas (unchanged, since it never had the prefix), and Cherries.
Common Use Cases
- Stripping markdown bullet markers (
-or*) off a pasted list. - Removing quotes and trailing commas from a JSON or SQL-style list of values.
- Cleaning a shared prefix (like a folder path) or file extension off a list of filenames.
FAQs
- How is this different from the Line Prefix & Suffix Tool? The Line Prefix & Suffix Tool ADDS text to the beginning and/or end of every line. This tool does the reverse — it REMOVES a specified prefix and/or suffix, but only from the lines that actually have it, leaving every other line untouched.
- What happens if a line doesn't start with the prefix I entered? That line is left completely unchanged — the removal only applies to lines that actually match, so you never risk accidentally cutting text off lines that don't have the prefix or suffix.
- Is the match case-sensitive? Yes — the prefix and suffix must match the line's text exactly, including capitalization, for the removal to apply.
